.class public Lcom/android/inputmethod/latin/LatinIME;
.super Landroid/inputmethodservice/InputMethodService;
.source "LatinIME.java"

# interfaces
.implements Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/inputmethod/latin/LatinIME$AutoDictionary;,
        Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;,
        Lcom/android/inputmethod/latin/LatinIME$AppPrivateCmd;
    }
.end annotation


# static fields
.field static final COMMA_TOGGLE:I = 0x3e8

.field private static final CPS_BUFFER_SIZE:I = 0x10

.field static final DEBUG:Z = false

.field private static final DELETE_ACCELERATE_AT:I = 0x14

.field static final FREQUENCY_FOR_AUTO_ADD:I = 0xfa

.field static final FREQUENCY_FOR_PICKED:I = 0x3

.field static final FREQUENCY_FOR_TYPED:I = 0x1

.field static final KEYCODE_ENTER:I = 0xa

.field static final KEYCODE_SPACE:I = 0x20

.field static final KEYCODE_VLINGO_KEY:I = -0x7f

.field private static final MAX_WORD_LENGTH:I = 0x30

.field static final MSG_HANDLE_RESULTS:I = 0x3

.field private static final MSG_START_TUTORIAL:I = 0x1

.field private static final MSG_UPDATE_SHIFT_STATE:I = 0x2

.field private static final MSG_UPDATE_SUGGESTIONS:I = 0x0

.field private static final PERF_DEBUG:Z = false

.field private static PICKER_SETS:Landroid/util/SparseArray; = null
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/util/SparseArray",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private static final POS_METHOD:I = 0x1

.field private static final POS_SETTINGS:I = 0x0

.field private static final PREF_AUTO_CAP:Ljava/lang/String; = "auto_cap"

.field private static final PREF_AUTO_COMPLETE:Ljava/lang/String; = "auto_complete"

.field private static final PREF_SHOW_COMPLETIONS_DKB:Ljava/lang/String; = "show_completions"

.field private static final PREF_SHOW_SUGGESTIONS:Ljava/lang/String; = "show_suggestions"

.field private static final PREF_SOUND_ON:Ljava/lang/String; = "sound_on"

.field private static final PREF_VIBRATE_ON:Ljava/lang/String; = "vibrate_on"

.field private static final QUICK_PRESS:I = 0xc8

.field private static final SHIFT_LOCKED:I = 0x2

.field private static final SHIFT_OFF:I = 0x0

.field private static final SHIFT_ON:I = 0x1

.field static final TRACE:Z


# instance fields
.field private final FX_VOLUME:F

.field private GoogleVISupportLan:[Ljava/lang/String;

.field private VlingoVISupportLan:[Ljava/lang/String;

.field private mAudioManager:Landroid/media/AudioManager;

.field private mAutoCap:Z

.field private mAutoCorrectOn:Z

.field private mAutoDictionary:Lcom/android/inputmethod/latin/ExpandableDictionary;

.field private mAutoPunctuate:Z

.field private mAutoReplace:Z

.field private mAutoSpace:Z

.field private mBestWord:Ljava/lang/CharSequence;

.field private mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

.field private mCandidateViewContainer:Lcom/android/inputmethod/latin/CandidateViewContainer;

.field private mCapsLock:Z

.field protected mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

.field private mCommittedLength:I

.field private mCompletionOn:Z

.field private mCompletions:[Landroid/view/inputmethod/CompletionInfo;

.field private mComposing:Ljava/lang/StringBuilder;

.field private mContactsDictionary:Lcom/android/inputmethod/latin/ContactsDictionary;

.field private mCorrectionMode:I

.field private mCpsIndex:I

.field private mCpsIntervals:[J

.field private mDeleteCount:I

.field mHandler:Landroid/os/Handler;

.field private mHardKeyEvent:Landroid/view/KeyEvent;

.field private mHasCommaPrevious:Z

.field private mHaseShiftPrevious:Z

.field private mIgnoreHardKeyUp:Z

.field private mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

.field private mIsHardKeyDown:Z

.field private mIsKeyFromSystem:Z

.field private mIsSupportVoiceInput:Z

.field private mJustAccepted:Z

.field private mJustRevertedSeparator:Ljava/lang/CharSequence;

.field mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

.field private mLastCpsTime:J

.field private mLastKeyTime:J

.field private mLocale:Ljava/lang/String;

.field private mMenuKeyPressed:Z

.field mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

.field private mOptionsDialog:Landroid/app/AlertDialog;

.field private mOrientation:I

.field private mPreShiftState:I

.field private mPredicting:Z

.field private mPredictionOn:Z

.field private mQuickFixes:Z

.field private mReceiver:Landroid/content/BroadcastReceiver;

.field private mRemoveSpacePunctuations:Ljava/lang/String;

.field private mSentenceSeparators:Ljava/lang/String;

.field protected mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

.field private mShowSuggestions:Z

.field private mShowingPostHoc:Z

.field private mSilentMode:Z

.field private mSoundOn:Z

.field private mSuggest:Lcom/android/inputmethod/latin/Suggest;

.field private mTutorial:Lcom/android/inputmethod/latin/Tutorial;

.field private mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

.field private mVibrateOn:Z

.field private mVibratePattern:[J

.field private mVibrator:Landroid/os/Vibrator;

.field private mVoiceEngineId:I

.field mVoiceInputHighlighted:Z

.field private mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

.field private mWord:Lcom/android/inputmethod/latin/WordComposer;

.field private mWordSeparators:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 1195
    new-instance v0, Landroid/util/SparseArray;

    invoke-direct {v0}, Landroid/util/SparseArray;-><init>()V

    sput-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    .line 1198
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x41

    const-string v2, "\u00c0\u00c1\u00c2\u00c4\u00c6\u00c3\u00c5\u0104\u0100"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1199
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x43

    const-string v2, "\u00c7\u0106\u010c"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1200
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x44

    const-string v2, "\u010e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1201
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x45

    const-string v2, "\u00c8\u00c9\u00ca\u00cb\u0118\u011a\u0112"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1202
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x47

    const-string v2, "\u011e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1203
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x4c

    const-string v2, "\u0141"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1204
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x49

    const-string v2, "\u00cc\u00cd\u00ce\u00cf\u012a\u0130"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1205
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x4e

    const-string v2, "\u00d1\u0143\u0147"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1206
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x4f

    const-string v2, "\u00d8\u0152\u00d5\u00d2\u00d3\u00d4\u00d6\u014c"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1207
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x52

    const-string v2, "\u0158"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1208
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x53

    const-string v2, "\u015a\u0160\u015e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1209
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x54

    const-string v2, "\u0164"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1210
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x55

    const-string v2, "\u00d9\u00da\u00db\u00dc\u016e\u016a"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1211
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x59

    const-string v2, "\u00dd\u0178"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1212
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x5a

    const-string v2, "\u0179\u017b\u017d"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1213
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x61

    const-string v2, "\u00e0\u00e1\u00e2\u00e4\u00e6\u00e3\u00e5\u0105\u0101"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1214
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x63

    const-string v2, "\u00e7\u0107\u010d"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1215
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x64

    const-string v2, "\u010f"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1216
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x65

    const-string v2, "\u00e8\u00e9\u00ea\u00eb\u0119\u011b\u0113"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1217
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x67

    const-string v2, "\u011f"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1218
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x69

    const-string v2, "\u00ec\u00ed\u00ee\u00ef\u012b\u0131"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1219
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x6c

    const-string v2, "\u0142"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1220
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x6e

    const-string v2, "\u00f1\u0144\u0148"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1221
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x6f

    const-string v2, "\u00f8\u0153\u00f5\u00f2\u00f3\u00f4\u00f6\u014d"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1222
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x72

    const-string v2, "\u0159"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1223
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x73

    const-string v2, "\u00a7\u00df\u015b\u0161\u015f"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1224
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x74

    const-string v2, "\u0165"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1225
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x75

    const-string v2, "\u00f9\u00fa\u00fb\u00fc\u016f\u016b"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1226
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x79

    const-string v2, "\u00fd\u00ff"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1227
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x7a

    const-string v2, "\u017a\u017c\u017e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1230
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x2f

    const-string v2, "\\"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1234
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x31

    const-string v2, "\u00b9\u00bd\u2153\u00bc\u215b"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1235
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x32

    const-string v2, "\u00b2\u2154"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1236
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x33

    const-string v2, "\u00b3\u00be\u215c"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1237
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x34

    const-string v2, "\u2074"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1238
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x35

    const-string v2, "\u215d"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1239
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x37

    const-string v2, "\u215e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1240
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x30

    const-string v2, "\u207f\u2205"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1241
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x24

    const-string v2, "\u00a2\u00a3\u20ac\u00a5\u20a3\u20a4\u20b1"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1242
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x25

    const-string v2, "\u2030"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1243
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x2a

    const-string v2, "\u2020\u2021"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1244
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x2d

    const-string v2, "\u2013\u2014"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1245
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x2b

    const-string v2, "\u00b1"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1246
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x28

    const-string v2, "[{<"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1247
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x29

    const-string v2, "]}>"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1248
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x21

    const-string v2, "\u00a1"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1249
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x22

    const-string v2, "\u201c\u201d\u00ab\u00bb\u02dd"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1250
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x3f

    const-string v2, "\u00bf"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1251
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x2c

    const-string v2, "\u201a\u201e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1255
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x3d

    const-string v2, "\u2260\u2248\u221e"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1256
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x3c

    const-string v2, "\u2264\u00ab\u2039"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1257
    sget-object v0, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    const/16 v1, 0x3e

    const-string v2, "\u2265\u00bb\u203a"

    invoke-virtual {v0, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 1258
    return-void
.end method

.method public constructor <init>()V
    .locals 6

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    const/4 v2, 0x0

    const-string v5, "en"

    .line 70
    invoke-direct {p0}, Landroid/inputmethodservice/InputMethodService;-><init>()V

    .line 138
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    .line 139
    new-instance v0, Lcom/android/inputmethod/latin/WordComposer;

    invoke-direct {v0}, Lcom/android/inputmethod/latin/WordComposer;-><init>()V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    .line 164
    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mLastKeyTime:J

    .line 166
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    .line 175
    const/high16 v0, -0x4080

    iput v0, p0, Lcom/android/inputmethod/latin/LatinIME;->FX_VOLUME:F

    .line 184
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    .line 185
    new-instance v0, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-direct {v0, p0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    .line 187
    new-instance v0, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-direct {v0, p0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    .line 188
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    .line 193
    iput-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    .line 195
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 198
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    .line 199
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "en"

    aput-object v5, v0, v2

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->GoogleVISupportLan:[Ljava/lang/String;

    .line 200
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "en"

    aput-object v5, v0, v2

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->VlingoVISupportLan:[Ljava/lang/String;

    .line 203
    iput v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    .line 205
    new-instance v0, Lcom/android/inputmethod/latin/LatinIME$1;

    invoke-direct {v0, p0}, Lcom/android/inputmethod/latin/LatinIME$1;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    .line 240
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    .line 241
    iput-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    .line 332
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsHardKeyDown:Z

    .line 333
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    .line 334
    iput-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mHardKeyEvent:Landroid/view/KeyEvent;

    .line 335
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMenuKeyPressed:Z

    .line 2472
    new-instance v0, Lcom/android/inputmethod/latin/LatinIME$2;

    invoke-direct {v0, p0}, Lcom/android/inputmethod/latin/LatinIME$2;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mReceiver:Landroid/content/BroadcastReceiver;

    .line 2689
    const/16 v0, 0x10

    new-array v0, v0, [J

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCpsIntervals:[J

    .line 2704
    return-void
.end method

.method static synthetic access$000(Lcom/android/inputmethod/latin/LatinIME;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 70
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestions()V

    return-void
.end method

.method static synthetic access$100(Lcom/android/inputmethod/latin/LatinIME;)Lcom/android/inputmethod/latin/Tutorial;
    .locals 1
    .parameter "x0"

    .prologue
    .line 70
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    return-object v0
.end method

.method static synthetic access$102(Lcom/android/inputmethod/latin/LatinIME;Lcom/android/inputmethod/latin/Tutorial;)Lcom/android/inputmethod/latin/Tutorial;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 70
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    return-object p1
.end method

.method static synthetic access$200(Lcom/android/inputmethod/latin/LatinIME;)Lcom/android/inputmethod/latin/LatinKeyboardView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 70
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    return-object v0
.end method

.method static synthetic access$300(Lcom/android/inputmethod/latin/LatinIME;Ljava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 70
    invoke-direct {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->handleVoiceResults(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$400(Lcom/android/inputmethod/latin/LatinIME;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 70
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateRingerMode()V

    return-void
.end method

.method static synthetic access$500(Lcom/android/inputmethod/latin/LatinIME;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 70
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->launchSettings()V

    return-void
.end method

.method private attachAlternatesToText(Ljava/lang/CharSequence;Ljava/util/List;)Ljava/lang/CharSequence;
    .locals 6
    .parameter "c_str"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/CharSequence;",
            "Ljava/util/List",
            "<",
            "Ljava/lang/CharSequence;",
            ">;)",
            "Ljava/lang/CharSequence;"
        }
    .end annotation

    .prologue
    .line 2334
    .local p2, suggestions:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    .line 2336
    .local v1, str:Ljava/lang/String;
    new-instance v0, Landroid/text/SpannableString;

    invoke-direct {v0, v1}, Landroid/text/SpannableString;-><init>(Ljava/lang/CharSequence;)V

    .line 2338
    .local v0, buffer:Landroid/text/SpannableString;
    new-instance v2, Landroid/text/Annotation;

    invoke-direct {p0, p2}, Lcom/android/inputmethod/latin/LatinIME;->listToString(Ljava/util/List;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v1, v3}, Landroid/text/Annotation;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v3, 0x0

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v4

    const/16 v5, 0x21

    invoke-virtual {v0, v2, v3, v4, v5}, Landroid/text/SpannableString;->setSpan(Ljava/lang/Object;III)V

    .line 2339
    new-instance v2, Landroid/text/SpannedString;

    invoke-direct {v2, v0}, Landroid/text/SpannedString;-><init>(Ljava/lang/CharSequence;)V

    return-object v2
.end method

.method private changeKeyboardMode()V
    .locals 2

    .prologue
    .line 2657
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->toggleSymbols()V

    .line 2658
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2659
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    .line 2662
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 2663
    return-void
.end method

.method private checkToggleCapsLock()V
    .locals 1

    .prologue
    .line 1833
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    invoke-virtual {v0}, Landroid/inputmethodservice/Keyboard;->isShifted()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1834
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->toggleCapsLock()V

    .line 1836
    :cond_0
    return-void
.end method

.method private checkTutorial(Ljava/lang/String;)V
    .locals 1
    .parameter "privateImeOptions"

    .prologue
    .line 2527
    if-nez p1, :cond_1

    .line 2537
    :cond_0
    :goto_0
    return-void

    .line 2528
    :cond_1
    const-string v0, "com.android.setupwizard:ShowTutorial"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 2529
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    if-nez v0, :cond_0

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->startTutorial()V

    goto :goto_0

    .line 2530
    :cond_2
    const-string v0, "com.android.setupwizard:HideTutorial"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2531
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    if-eqz v0, :cond_0

    .line 2532
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/Tutorial;->close()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2533
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    goto :goto_0
.end method

.method private commitTyped(Landroid/view/inputmethod/InputConnection;)V
    .locals 3
    .parameter "inputConnection"

    .prologue
    const/4 v2, 0x1

    .line 1333
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v0, :cond_2

    .line 1334
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 1335
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I

    move-result v0

    if-lez v0, :cond_1

    .line 1336
    if-eqz p1, :cond_0

    .line 1338
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/CandidateView;->getSuggestions()Ljava/util/List;

    move-result-object v1

    invoke-direct {p0, v0, v1}, Lcom/android/inputmethod/latin/LatinIME;->attachAlternatesToText(Ljava/lang/CharSequence;Ljava/util/List;)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {p1, v0, v2}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1340
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I

    move-result v0

    iput v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommittedLength:I

    .line 1341
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-static {v0}, Lcom/android/inputmethod/latin/TextEntryState;->acceptedTyped(Ljava/lang/CharSequence;)V

    .line 1342
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoDictionary:Lcom/android/inputmethod/latin/ExpandableDictionary;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1, v2}, Lcom/android/inputmethod/latin/ExpandableDictionary;->addWord(Ljava/lang/String;I)V

    .line 1344
    :cond_1
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestions()V

    .line 1346
    :cond_2
    return-void
.end method

.method private doPostHoc()Z
    .locals 1

    .prologue
    .line 2312
    const/4 v0, 0x1

    return v0
.end method

.method private doubleSpace()V
    .locals 8

    .prologue
    const/16 v7, 0x20

    const/4 v6, 0x3

    const/4 v5, 0x2

    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 1407
    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoPunctuate:Z

    if-nez v2, :cond_1

    .line 1422
    :cond_0
    :goto_0
    return-void

    .line 1409
    :cond_1
    iget v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    if-eqz v2, :cond_0

    .line 1410
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 1411
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v0, :cond_0

    .line 1412
    invoke-interface {v0, v6, v3}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v1

    .line 1413
    .local v1, lastThree:Ljava/lang/CharSequence;
    if-eqz v1, :cond_0

    invoke-interface {v1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    if-ne v2, v6, :cond_0

    invoke-interface {v1, v3}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    invoke-static {v2}, Ljava/lang/Character;->isLetterOrDigit(C)Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v1, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    if-ne v2, v7, :cond_0

    invoke-interface {v1, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    if-ne v2, v7, :cond_0

    .line 1416
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 1417
    invoke-interface {v0, v5, v3}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1418
    const-string v2, ". "

    invoke-interface {v0, v2, v4}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1419
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 1420
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    goto :goto_0
.end method

.method private getFirstSpacePos(Ljava/lang/CharSequence;)I
    .locals 3
    .parameter "cs"

    .prologue
    .line 2076
    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v0

    .line 2078
    .local v0, cs_len:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v0, :cond_1

    .line 2079
    invoke-interface {p1, v1}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v2

    if-eqz v2, :cond_0

    move v2, v1

    .line 2084
    :goto_1
    return v2

    .line 2078
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 2084
    :cond_1
    const/4 v2, -0x1

    goto :goto_1
.end method

.method private getHKBShiftState()I
    .locals 3

    .prologue
    .line 484
    const/4 v0, 0x0

    .line 486
    .local v0, state:I
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v1, :cond_0

    .line 487
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/android/inputmethod/latin/MetaKeyHandler;->getMetaState(I)I

    move-result v0

    .line 490
    :cond_0
    return v0
.end method

.method private getLastSpacePos(Ljava/lang/CharSequence;)I
    .locals 3
    .parameter "cs"

    .prologue
    .line 2088
    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v0

    .line 2090
    .local v0, cs_len:I
    const/4 v2, 0x1

    sub-int v1, v0, v2

    .local v1, i:I
    :goto_0
    if-ltz v1, :cond_1

    .line 2091
    invoke-interface {p1, v1}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v2

    if-eqz v2, :cond_0

    move v2, v1

    .line 2095
    :goto_1
    return v2

    .line 2090
    :cond_0
    add-int/lit8 v1, v1, -0x1

    goto :goto_0

    .line 2095
    :cond_1
    const/4 v2, -0x1

    goto :goto_1
.end method

.method private getPrimaryCodeFromHardKeyEvent(ILandroid/view/KeyEvent;)I
    .locals 5
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/16 v4, 0x39

    const/16 v3, 0x30

    .line 1263
    const/4 v1, 0x0

    .line 1265
    .local v1, primaryCode:I
    const/16 v2, 0x43

    if-ne p1, v2, :cond_1

    .line 1266
    const/4 v1, -0x5

    :cond_0
    :goto_0
    move v2, v1

    .line 1288
    :goto_1
    return v2

    .line 1268
    :cond_1
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getUnicodeChar()I

    move-result v0

    .line 1273
    .local v0, charCode:I
    if-lt v0, v3, :cond_2

    if-gt v0, v4, :cond_2

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-nez v2, :cond_2

    .line 1274
    const/4 v2, 0x0

    goto :goto_1

    .line 1277
    :cond_2
    if-lt v0, v3, :cond_3

    if-le v0, v4, :cond_6

    :cond_3
    const/16 v2, 0x41

    if-lt v0, v2, :cond_4

    const/16 v2, 0x5a

    if-le v0, v2, :cond_6

    :cond_4
    const/16 v2, 0x61

    if-lt v0, v2, :cond_5

    const/16 v2, 0x7a

    if-le v0, v2, :cond_6

    :cond_5
    const/16 v2, 0x27

    if-eq v0, v2, :cond_6

    const/16 v2, 0xa

    if-eq v0, v2, :cond_6

    const/16 v2, 0x20

    if-eq v0, v2, :cond_6

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v2

    if-nez v2, :cond_6

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->isRemoveSpacePunctuation(I)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 1284
    :cond_6
    move v1, v0

    goto :goto_0
.end method

.method private getShiftStatus()I
    .locals 2

    .prologue
    .line 1847
    const/4 v0, 0x0

    .line 1848
    .local v0, shiftState:I
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v1

    check-cast v1, Lcom/android/inputmethod/latin/LatinKeyboard;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->isShiftLocked()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 1849
    const/4 v0, 0x2

    .line 1853
    :cond_0
    :goto_0
    return v0

    .line 1850
    :cond_1
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v1

    invoke-virtual {v1}, Landroid/inputmethodservice/Keyboard;->isShifted()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 1851
    const/4 v0, 0x1

    goto :goto_0
.end method

.method private handleBackspace()V
    .locals 8

    .prologue
    const/16 v7, 0x43

    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 1609
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v3, :cond_1

    .line 1610
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->revertVoiceInput()V

    .line 1645
    :cond_0
    :goto_0
    return-void

    .line 1614
    :cond_1
    const/4 v0, 0x0

    .line 1615
    .local v0, deleteChar:Z
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v1

    .line 1616
    .local v1, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v1, :cond_0

    .line 1617
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v3, :cond_4

    .line 1618
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->length()I

    move-result v2

    .line 1619
    .local v2, length:I
    if-lez v2, :cond_3

    .line 1620
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    sub-int v4, v2, v5

    invoke-virtual {v3, v4, v2}, Ljava/lang/StringBuilder;->delete(II)Ljava/lang/StringBuilder;

    .line 1621
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/WordComposer;->deleteLast()V

    .line 1622
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-interface {v1, v3, v5}, Landroid/view/inputmethod/InputConnection;->setComposingText(Ljava/lang/CharSequence;I)Z

    .line 1623
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->length()I

    move-result v3

    if-nez v3, :cond_2

    .line 1624
    iput-boolean v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 1626
    :cond_2
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->postUpdateSuggestions()V

    .line 1633
    .end local v2           #length:I
    :goto_1
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->postUpdateShiftKeyState()V

    .line 1634
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->backspace()V

    .line 1635
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->getState()I

    move-result v3

    const/16 v4, 0x9

    if-ne v3, v4, :cond_5

    .line 1636
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->revertLastWord(Z)V

    goto :goto_0

    .line 1628
    .restart local v2       #length:I
    :cond_3
    invoke-interface {v1, v5, v6}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    goto :goto_1

    .line 1631
    .end local v2           #length:I
    :cond_4
    const/4 v0, 0x1

    goto :goto_1

    .line 1638
    :cond_5
    if-eqz v0, :cond_6

    .line 1639
    invoke-virtual {p0, v7}, Lcom/android/inputmethod/latin/LatinIME;->sendDownUpKeyEvents(I)V

    .line 1640
    iget v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mDeleteCount:I

    const/16 v4, 0x14

    if-le v3, v4, :cond_6

    .line 1641
    invoke-virtual {p0, v7}, Lcom/android/inputmethod/latin/LatinIME;->sendDownUpKeyEvents(I)V

    .line 1644
    :cond_6
    const/4 v3, 0x0

    iput-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    goto :goto_0
.end method

.method private handleCharacter(I[I)V
    .locals 5
    .parameter "primaryCode"
    .parameter "keyCodes"

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 1660
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v1, :cond_0

    .line 1661
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 1664
    :cond_0
    invoke-direct {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->isAlphabet(I)Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isPredictionOn()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isCursorTouchingWord()Z

    move-result v1

    if-nez v1, :cond_1

    .line 1665
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-nez v1, :cond_1

    .line 1666
    iput-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 1667
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 1668
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/WordComposer;->reset()V

    .line 1671
    :cond_1
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v1

    if-eqz v1, :cond_4

    .line 1673
    if-eqz p2, :cond_2

    aget v1, p2, v3

    if-ltz v1, :cond_2

    aget v1, p2, v3

    const v2, 0x10ffff

    if-le v1, v2, :cond_3

    .line 1715
    :cond_2
    :goto_0
    return-void

    .line 1677
    :cond_3
    new-instance v1, Ljava/lang/String;

    invoke-direct {v1, p2, v3, v4}, Ljava/lang/String;-><init>([III)V

    invoke-virtual {v1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1, v3}, Ljava/lang/String;->charAt(I)C

    move-result p1

    .line 1679
    :cond_4
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v1, :cond_9

    .line 1682
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->length()I

    move-result v1

    if-nez v1, :cond_6

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v1

    if-nez v1, :cond_5

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->isUsingHardKeyboard()Z

    move-result v1

    if-eqz v1, :cond_6

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->getHKBShiftState()I

    move-result v1

    if-eqz v1, :cond_6

    .line 1686
    :cond_5
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v1, v4}, Lcom/android/inputmethod/latin/WordComposer;->setCapitalized(Z)V

    .line 1688
    :cond_6
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    int-to-char v2, p1

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    .line 1689
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v1, p1, p2}, Lcom/android/inputmethod/latin/WordComposer;->add(I[I)V

    .line 1690
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 1691
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v0, :cond_7

    .line 1692
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-interface {v0, v1, v4}, Landroid/view/inputmethod/InputConnection;->setComposingText(Ljava/lang/CharSequence;I)Z

    .line 1694
    :cond_7
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->postUpdateSuggestions()V

    .line 1712
    .end local v0           #ic:Landroid/view/inputmethod/InputConnection;
    :cond_8
    :goto_1
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 1713
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->measureCps()V

    .line 1714
    int-to-char v1, p1

    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v2

    invoke-static {v1, v2}, Lcom/android/inputmethod/latin/TextEntryState;->typedCharacter(CZ)V

    goto :goto_0

    .line 1701
    :cond_9
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    if-eqz v1, :cond_a

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mHardKeyEvent:Landroid/view/KeyEvent;

    if-eqz v1, :cond_a

    .line 1702
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 1703
    .restart local v0       #ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v0, :cond_8

    .line 1704
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mHardKeyEvent:Landroid/view/KeyEvent;

    invoke-interface {v0, v1}, Landroid/view/inputmethod/InputConnection;->sendKeyEvent(Landroid/view/KeyEvent;)Z

    goto :goto_1

    .line 1707
    .end local v0           #ic:Landroid/view/inputmethod/InputConnection;
    :cond_a
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsHardKeyDown:Z

    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    .line 1708
    int-to-char v1, p1

    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinIME;->sendKeyChar(C)V

    goto :goto_1
.end method

.method private handleClose()V
    .locals 1

    .prologue
    .line 1818
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v0, :cond_0

    .line 1819
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 1821
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->isVoiceKeyboardShown()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 1823
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->onCancel()V

    .line 1826
    :cond_1
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->commitTyped(Landroid/view/inputmethod/InputConnection;)V

    .line 1827
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->requestHideSelf(I)V

    .line 1828
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->closing()V

    .line 1829
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->endSession()V

    .line 1830
    return-void
.end method

.method private handleCommaToggle()V
    .locals 9

    .prologue
    const/16 v8, 0x2c

    const/16 v4, 0x2e

    const/4 v7, 0x2

    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 1517
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v1

    .line 1518
    .local v1, ic:Landroid/view/inputmethod/InputConnection;
    const-string v0, ","

    .line 1520
    .local v0, c:Ljava/lang/String;
    if-nez v1, :cond_0

    .line 1562
    :goto_0
    return-void

    .line 1523
    :cond_0
    invoke-interface {v1, v7, v6}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 1525
    .local v2, preChar:Ljava/lang/CharSequence;
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    if-eqz v3, :cond_8

    if-eqz v2, :cond_8

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->isTimeOut()Z

    move-result v3

    if-nez v3, :cond_8

    .line 1528
    invoke-interface {v1}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 1530
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v3, v5, :cond_2

    invoke-interface {v2, v6}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-ne v3, v4, :cond_2

    .line 1531
    invoke-interface {v1, v5, v6}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1532
    const-string v3, ","

    invoke-interface {v1, v3, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1554
    :cond_1
    :goto_1
    invoke-interface {v1}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 1555
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    goto :goto_0

    .line 1533
    :cond_2
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v3, v7, :cond_3

    invoke-interface {v2, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-ne v3, v4, :cond_3

    .line 1534
    invoke-interface {v1, v5, v6}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1535
    const-string v3, ","

    invoke-interface {v1, v3, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    goto :goto_1

    .line 1536
    :cond_3
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v3, v7, :cond_4

    invoke-interface {v2, v6}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-ne v3, v4, :cond_4

    invoke-interface {v2, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    const/16 v4, 0x20

    if-ne v3, v4, :cond_4

    .line 1538
    invoke-interface {v1, v7, v6}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1539
    const-string v3, ", "

    invoke-interface {v1, v3, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    goto :goto_1

    .line 1541
    :cond_4
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v3, v7, :cond_5

    invoke-interface {v2, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-eq v3, v8, :cond_6

    :cond_5
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v3, v5, :cond_7

    invoke-interface {v2, v6}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-ne v3, v8, :cond_7

    .line 1543
    :cond_6
    invoke-interface {v1, v5, v6}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1544
    const-string v3, "..."

    invoke-interface {v1, v3, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1545
    iput-boolean v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    .line 1546
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    goto :goto_1

    .line 1547
    :cond_7
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v3, v7, :cond_1

    invoke-interface {v2, v6}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-ne v3, v8, :cond_1

    invoke-interface {v2, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    const/16 v4, 0x20

    if-ne v3, v4, :cond_1

    .line 1549
    invoke-interface {v1, v7, v6}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1550
    const-string v3, "... "

    invoke-interface {v1, v3, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1551
    iput-boolean v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    .line 1552
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    goto/16 :goto_1

    .line 1558
    :cond_8
    invoke-direct {p0, v4}, Lcom/android/inputmethod/latin/LatinIME;->handleSeparator(I)V

    .line 1559
    iput-boolean v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    .line 1560
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->startTimer()V

    goto/16 :goto_0
.end method

.method private handleHardKeyEvent(ILandroid/view/KeyEvent;)Z
    .locals 6
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 1086
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v1

    .line 1087
    .local v1, ei:Landroid/view/inputmethod/EditorInfo;
    if-eqz v1, :cond_0

    iget v3, v1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    if-nez v3, :cond_1

    :cond_0
    move v3, v4

    .line 1157
    :goto_0
    return v3

    .line 1093
    :cond_1
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mQuickFixes:Z

    if-nez v3, :cond_2

    move v3, v4

    .line 1094
    goto :goto_0

    .line 1102
    :cond_2
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->handleKeyShortcuts(ILandroid/view/KeyEvent;)Z

    move-result v3

    if-eqz v3, :cond_3

    move v3, v4

    .line 1106
    goto :goto_0

    .line 1113
    :cond_3
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->needHandleHardKeyEvent(ILandroid/view/KeyEvent;)Z

    move-result v3

    if-nez v3, :cond_4

    move v3, v4

    .line 1114
    goto :goto_0

    .line 1118
    :cond_4
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->handleNavigationKey(ILandroid/view/KeyEvent;)Z

    move-result v3

    if-eqz v3, :cond_5

    move v3, v5

    .line 1119
    goto :goto_0

    .line 1132
    :cond_5
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->getPrimaryCodeFromHardKeyEvent(ILandroid/view/KeyEvent;)I

    move-result v2

    .line 1134
    .local v2, primaryCode:I
    if-eqz v2, :cond_7

    .line 1135
    new-array v0, v5, [I

    .line 1136
    .local v0, codes:[I
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getUnicodeChar()I

    move-result v3

    aput v3, v0, v4

    .line 1141
    aget v3, v0, v4

    invoke-static {v3}, Ljava/lang/Character;->isUpperCase(I)Z

    move-result v3

    if-eqz v3, :cond_6

    .line 1142
    aget v3, v0, v4

    invoke-static {v3}, Ljava/lang/Character;->toLowerCase(I)I

    move-result v3

    aput v3, v0, v4

    .line 1146
    :cond_6
    iput-boolean v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsHardKeyDown:Z

    .line 1147
    iput-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    .line 1149
    invoke-virtual {p0, v2, v0}, Lcom/android/inputmethod/latin/LatinIME;->onKey(I[I)V

    .line 1151
    iput-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsHardKeyDown:Z

    move v3, v5

    .line 1154
    goto :goto_0

    .end local v0           #codes:[I
    :cond_7
    move v3, v4

    .line 1157
    goto :goto_0
.end method

.method private handleKeyShortcuts(ILandroid/view/KeyEvent;)Z
    .locals 5
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v4, 0x0

    const/4 v3, 0x1

    .line 2738
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getAction()I

    move-result v2

    if-nez v2, :cond_1

    move v0, v3

    .line 2739
    .local v0, isDown:Z
    :goto_0
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v1

    .line 2741
    .local v1, repeatCount:I
    const/16 v2, 0x52

    if-ne p1, v2, :cond_3

    .line 2742
    if-eqz v0, :cond_2

    .line 2743
    if-nez v1, :cond_0

    .line 2744
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mMenuKeyPressed:Z

    :cond_0
    :goto_1
    move v2, v3

    .line 2762
    :goto_2
    return v2

    .end local v0           #isDown:Z
    .end local v1           #repeatCount:I
    :cond_1
    move v0, v4

    .line 2738
    goto :goto_0

    .line 2747
    .restart local v0       #isDown:Z
    .restart local v1       #repeatCount:I
    :cond_2
    iput-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mMenuKeyPressed:Z

    goto :goto_1

    .line 2753
    :cond_3
    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMenuKeyPressed:Z

    if-eqz v2, :cond_5

    .line 2754
    const/16 v2, 0x1d

    if-eq p1, v2, :cond_4

    const/16 v2, 0x34

    if-eq p1, v2, :cond_4

    const/16 v2, 0x1f

    if-eq p1, v2, :cond_4

    const/16 v2, 0x32

    if-ne p1, v2, :cond_5

    :cond_4
    move v2, v3

    .line 2758
    goto :goto_2

    :cond_5
    move v2, v4

    .line 2762
    goto :goto_2
.end method

.method private handleNavigationKey(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 1293
    const/4 v0, 0x0

    .line 1295
    .local v0, handled:Z
    packed-switch p1, :pswitch_data_0

    .line 1307
    const/4 v0, 0x0

    .line 1311
    :goto_0
    return v0

    .line 1302
    :pswitch_0
    const/4 v0, 0x0

    .line 1304
    goto :goto_0

    .line 1295
    :pswitch_data_0
    .packed-switch 0x13
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method private handleSeparator(I)V
    .locals 6
    .parameter "primaryCode"

    .prologue
    const/16 v5, 0xa

    .line 1719
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v3, :cond_0

    .line 1720
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 1723
    :cond_0
    const/4 v2, 0x0

    .line 1725
    .local v2, pickedDefault:Z
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v1

    .line 1726
    .local v1, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v1, :cond_1

    .line 1727
    invoke-interface {v1}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 1729
    :cond_1
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v3, :cond_3

    .line 1734
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCorrectOn:Z

    if-eqz v3, :cond_8

    const/16 v3, 0x27

    if-eq p1, v3, :cond_8

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    if-eqz v3, :cond_2

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    invoke-interface {v3}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-eqz v3, :cond_2

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    const/4 v4, 0x0

    invoke-interface {v3, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    if-eq v3, p1, :cond_8

    .line 1738
    :cond_2
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->pickDefaultSuggestion()V

    .line 1739
    const/4 v2, 0x1

    .line 1745
    :cond_3
    :goto_0
    const/4 v0, 0x0

    .line 1748
    .local v0, alreadySwap:Z
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    if-eqz v3, :cond_a

    .line 1752
    if-ne v5, p1, :cond_9

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->noEnterAction()Z

    move-result v3

    if-nez v3, :cond_9

    .line 1753
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsHardKeyDown:Z

    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    .line 1754
    int-to-char v3, p1

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->sendKeyChar(C)V

    .line 1782
    :cond_4
    :goto_1
    int-to-char v3, p1

    const/4 v4, 0x1

    invoke-static {v3, v4}, Lcom/android/inputmethod/latin/TextEntryState;->typedCharacter(CZ)V

    .line 1783
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->getState()I

    move-result v3

    const/4 v4, 0x6

    if-ne v3, v4, :cond_b

    if-eq p1, v5, :cond_b

    .line 1785
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->swapPunctuationAndSpace()V

    .line 1790
    :cond_5
    :goto_2
    if-eqz v2, :cond_6

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    if-eqz v3, :cond_6

    .line 1791
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/WordComposer;->getTypedWord()Ljava/lang/CharSequence;

    move-result-object v3

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    invoke-static {v3, v4}, Lcom/android/inputmethod/latin/TextEntryState;->acceptedDefault(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)V

    .line 1793
    :cond_6
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 1794
    if-eqz v1, :cond_7

    .line 1795
    invoke-interface {v1}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 1797
    :cond_7
    return-void

    .line 1741
    .end local v0           #alreadySwap:Z
    :cond_8
    invoke-direct {p0, v1}, Lcom/android/inputmethod/latin/LatinIME;->commitTyped(Landroid/view/inputmethod/InputConnection;)V

    goto :goto_0

    .line 1768
    .restart local v0       #alreadySwap:Z
    :cond_9
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mHardKeyEvent:Landroid/view/KeyEvent;

    if-eqz v3, :cond_4

    .line 1770
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsHardKeyDown:Z

    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    .line 1771
    int-to-char v3, p1

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->sendKeyChar(C)V

    goto :goto_1

    .line 1777
    :cond_a
    int-to-char v3, p1

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->sendKeyChar(C)V

    goto :goto_1

    .line 1786
    :cond_b
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isPredictionOn()Z

    move-result v3

    if-eqz v3, :cond_5

    const/16 v3, 0x20

    if-ne p1, v3, :cond_5

    .line 1788
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->doubleSpace()V

    goto :goto_2
.end method

.method private handleShift()V
    .locals 3

    .prologue
    .line 1648
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    .line 1649
    .local v0, currentKeyboard:Landroid/inputmethodservice/Keyboard;
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v1

    if-eqz v1, :cond_2

    .line 1651
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->checkToggleCapsLock()V

    .line 1652
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    if-nez v2, :cond_0

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v2

    if-nez v2, :cond_1

    :cond_0
    const/4 v2, 0x1

    :goto_0
    invoke-virtual {v1, v2}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    .line 1656
    :goto_1
    return-void

    .line 1652
    :cond_1
    const/4 v2, 0x0

    goto :goto_0

    .line 1654
    :cond_2
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->toggleShift()V

    goto :goto_1
.end method

.method private handleShiftPress()V
    .locals 4

    .prologue
    const/4 v1, 0x2

    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 1856
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 1857
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->getShiftStatus()I

    move-result v0

    iput v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    .line 1859
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1860
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->isTimeOut()Z

    move-result v0

    if-nez v0, :cond_1

    .line 1861
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v3}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    .line 1862
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 1863
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    .line 1864
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    .line 1865
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    .line 1876
    :cond_0
    :goto_0
    return-void

    .line 1867
    :cond_1
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    if-ne v0, v1, :cond_3

    .line 1868
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 1869
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    .line 1870
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v1

    if-nez v1, :cond_2

    move v1, v3

    :goto_1
    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    goto :goto_0

    :cond_2
    move v1, v2

    goto :goto_1

    .line 1872
    :cond_3
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v1

    if-nez v1, :cond_4

    move v1, v3

    :goto_2
    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    goto :goto_0

    :cond_4
    move v1, v2

    goto :goto_2
.end method

.method private handleShiftUp()V
    .locals 4

    .prologue
    const/4 v3, 0x2

    const/4 v2, 0x0

    const/4 v1, 0x1

    .line 1880
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v3}, Landroid/os/Handler;->removeMessages(I)V

    .line 1881
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v0

    if-eqz v0, :cond_8

    .line 1882
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift()Z

    move-result v0

    if-eqz v0, :cond_4

    .line 1883
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    if-ne v0, v1, :cond_1

    .line 1884
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    .line 1911
    :cond_0
    :goto_0
    return-void

    .line 1885
    :cond_1
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    if-ne v0, v3, :cond_3

    .line 1886
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v0

    if-nez v0, :cond_2

    .line 1887
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    .line 1888
    :cond_2
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 1889
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    goto :goto_0

    .line 1890
    :cond_3
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    if-nez v0, :cond_0

    .line 1891
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v2}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    goto :goto_0

    .line 1894
    :cond_4
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    if-ne v0, v1, :cond_6

    .line 1895
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v0

    if-nez v0, :cond_5

    .line 1896
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    .line 1897
    :cond_5
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 1898
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    goto :goto_0

    .line 1899
    :cond_6
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPreShiftState:I

    if-ne v0, v3, :cond_7

    .line 1900
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 1901
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    .line 1902
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v2}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    goto :goto_0

    .line 1904
    :cond_7
    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    .line 1905
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->startTimer()V

    goto :goto_0

    .line 1909
    :cond_8
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->toggleShift()V

    goto :goto_0
.end method

.method private handleVoiceResults(Ljava/lang/String;)V
    .locals 8
    .parameter "voiceResult"

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x1

    .line 248
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v1

    .line 249
    .local v1, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v1, :cond_0

    if-eqz p1, :cond_0

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v4

    if-nez v4, :cond_1

    .line 306
    :cond_0
    :goto_0
    return-void

    .line 256
    :cond_1
    invoke-interface {v1}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 257
    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v4, :cond_2

    .line 258
    invoke-direct {p0, v1}, Lcom/android/inputmethod/latin/LatinIME;->commitTyped(Landroid/view/inputmethod/InputConnection;)V

    .line 264
    :cond_2
    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v4, :cond_3

    .line 265
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 271
    :cond_3
    const/4 v2, 0x0

    .line 272
    .local v2, spaceL:Z
    invoke-interface {v1, v6, v7}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v0

    .line 273
    .local v0, csL:Ljava/lang/CharSequence;
    if-eqz v0, :cond_4

    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    if-lez v4, :cond_4

    const/16 v4, 0x20

    invoke-interface {v0, v7}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v5

    if-eq v4, v5, :cond_4

    .line 274
    const/4 v2, 0x1

    .line 277
    :cond_4
    new-instance v3, Ljava/lang/String;

    invoke-direct {v3}, Ljava/lang/String;-><init>()V

    .line 278
    .local v3, voiceInput:Ljava/lang/String;
    if-eqz v2, :cond_5

    .line 279
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 285
    :cond_5
    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    if-eqz v4, :cond_6

    .line 286
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {p1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 299
    :goto_1
    invoke-interface {v1, v3, v6}, Landroid/view/inputmethod/InputConnection;->setComposingText(Ljava/lang/CharSequence;I)Z

    .line 300
    invoke-interface {v1}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 305
    iput-boolean v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    goto :goto_0

    .line 287
    :cond_6
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->preferCapitalization()Z

    move-result v4

    if-nez v4, :cond_7

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v4}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v4

    if-eqz v4, :cond_8

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v4

    if-eqz v4, :cond_8

    .line 289
    :cond_7
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {p1}, Ljava/lang/String;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5, v7}, Ljava/lang/String;->charAt(I)C

    move-result v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v5

    invoke-virtual {p1, v6, v5}, Ljava/lang/String;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    goto :goto_1

    .line 292
    :cond_8
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    goto :goto_1
.end method

.method private initMetaKeyHandler()Lcom/android/inputmethod/latin/MetaKeyHandler;
    .locals 4

    .prologue
    .line 394
    const/4 v1, 0x0

    .line 395
    .local v1, metaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 397
    .local v0, config:Landroid/content/res/Configuration;
    if-eqz v0, :cond_0

    iget v2, v0, Landroid/content/res/Configuration;->keyboard:I

    const/4 v3, 0x1

    if-eq v2, v3, :cond_0

    .line 398
    new-instance v1, Lcom/android/inputmethod/latin/MetaKeyHandler;

    .end local v1           #metaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;
    invoke-direct {v1}, Lcom/android/inputmethod/latin/MetaKeyHandler;-><init>()V

    .line 401
    .restart local v1       #metaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;
    :cond_0
    return-object v1
.end method

.method private initSuggest(Ljava/lang/String;)V
    .locals 3
    .parameter "locale"

    .prologue
    .line 440
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinIME;->mLocale:Ljava/lang/String;

    .line 441
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->loadVoiceEngineId()I

    move-result v0

    iput v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceEngineId:I

    .line 442
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isSupportedVILanguage()Z

    move-result v0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    .line 443
    const-string v0, "LatinIME"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "locale changed, current language is supported by Voice Input Engine? "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 444
    new-instance v0, Lcom/android/inputmethod/latin/Suggest;

    const/high16 v1, 0x7f05

    invoke-direct {v0, p0, v1}, Lcom/android/inputmethod/latin/Suggest;-><init>(Landroid/content/Context;I)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    .line 445
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setCorrectionMode(I)V

    .line 447
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoReplace:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setAutoReplaceFlag(Z)V

    .line 449
    new-instance v0, Lcom/android/inputmethod/latin/UserDictionary;

    invoke-direct {v0, p0}, Lcom/android/inputmethod/latin/UserDictionary;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

    .line 450
    new-instance v0, Lcom/android/inputmethod/latin/ContactsDictionary;

    invoke-direct {v0, p0}, Lcom/android/inputmethod/latin/ContactsDictionary;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mContactsDictionary:Lcom/android/inputmethod/latin/ContactsDictionary;

    .line 451
    new-instance v0, Lcom/android/inputmethod/latin/LatinIME$AutoDictionary;

    invoke-direct {v0, p0, p0}, Lcom/android/inputmethod/latin/LatinIME$AutoDictionary;-><init>(Lcom/android/inputmethod/latin/LatinIME;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoDictionary:Lcom/android/inputmethod/latin/ExpandableDictionary;

    .line 452
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setUserDictionary(Lcom/android/inputmethod/latin/Dictionary;)V

    .line 453
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mContactsDictionary:Lcom/android/inputmethod/latin/ContactsDictionary;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setContactsDictionary(Lcom/android/inputmethod/latin/Dictionary;)V

    .line 454
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoDictionary:Lcom/android/inputmethod/latin/ExpandableDictionary;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setAutoDictionary(Lcom/android/inputmethod/latin/Dictionary;)V

    .line 455
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const/high16 v1, 0x7f0a

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWordSeparators:Ljava/lang/String;

    .line 456
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a0001

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSentenceSeparators:Ljava/lang/String;

    .line 458
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0a0002

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mRemoveSpacePunctuations:Ljava/lang/String;

    .line 459
    return-void
.end method

.method private isAlphabet(I)Z
    .locals 1
    .parameter "code"

    .prologue
    .line 1430
    invoke-static {p1}, Ljava/lang/Character;->isLetter(I)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1431
    const/4 v0, 0x1

    .line 1433
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private isCandidateStripVisible()Z
    .locals 1

    .prologue
    .line 1926
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isPredictionOn()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowSuggestions:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private isContractWordOfTyped(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
    .locals 6
    .parameter "contractWord"
    .parameter "typedWord"

    .prologue
    .line 2399
    const/4 v2, 0x0

    .line 2400
    .local v2, result:Z
    if-eqz p1, :cond_2

    if-eqz p2, :cond_2

    .line 2401
    invoke-interface {p2}, Ljava/lang/CharSequence;->length()I

    move-result v3

    .line 2402
    .local v3, typedLength:I
    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v0

    .line 2403
    .local v0, contractLength:I
    if-le v0, v3, :cond_2

    .line 2404
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v0, :cond_1

    .line 2405
    invoke-interface {p1, v1}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v4

    const/16 v5, 0x27

    if-ne v4, v5, :cond_0

    .line 2406
    add-int/lit8 v0, v0, -0x1

    .line 2404
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 2409
    :cond_1
    if-ne v0, v3, :cond_2

    .line 2410
    const/4 v2, 0x1

    .line 2414
    .end local v0           #contractLength:I
    .end local v1           #i:I
    .end local v3           #typedLength:I
    :cond_2
    return v2
.end method

.method private isCursorTouchingWord()Z
    .locals 6

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 2343
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 2344
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v0, :cond_0

    move v3, v4

    .line 2355
    :goto_0
    return v3

    .line 2345
    :cond_0
    invoke-interface {v0, v5, v4}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v1

    .line 2346
    .local v1, toLeft:Ljava/lang/CharSequence;
    invoke-interface {v0, v5, v4}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2347
    .local v2, toRight:Ljava/lang/CharSequence;
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_1

    invoke-interface {v1, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v3

    if-nez v3, :cond_1

    move v3, v5

    .line 2349
    goto :goto_0

    .line 2351
    :cond_1
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_2

    invoke-interface {v2, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    invoke-virtual {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v3

    if-nez v3, :cond_2

    move v3, v5

    .line 2353
    goto :goto_0

    :cond_2
    move v3, v4

    .line 2355
    goto :goto_0
.end method

.method private isPredictionOn()Z
    .locals 1

    .prologue
    .line 1920
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 1922
    .local v0, predictionOn:Z
    return v0
.end method

.method private isSupportedVILanguage()Z
    .locals 7

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 409
    const-string v2, "LatinIME"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "current locale is: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mLocale:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 410
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mLocale:Ljava/lang/String;

    const/4 v3, 0x2

    invoke-virtual {v2, v6, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    .line 411
    .local v1, lan:Ljava/lang/String;
    iget v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceEngineId:I

    if-ne v2, v5, :cond_1

    .line 412
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->GoogleVISupportLan:[Ljava/lang/String;

    array-length v2, v2

    if-ge v0, v2, :cond_3

    .line 413
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->GoogleVISupportLan:[Ljava/lang/String;

    aget-object v2, v2, v0

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    move v2, v5

    .line 422
    :goto_1
    return v2

    .line 412
    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 417
    .end local v0           #i:I
    :cond_1
    const/4 v0, 0x0

    .restart local v0       #i:I
    :goto_2
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->VlingoVISupportLan:[Ljava/lang/String;

    array-length v2, v2

    if-ge v0, v2, :cond_3

    .line 418
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->VlingoVISupportLan:[Ljava/lang/String;

    aget-object v2, v2, v0

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    move v2, v5

    .line 419
    goto :goto_1

    .line 417
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    :cond_3
    move v2, v6

    .line 422
    goto :goto_1
.end method

.method private launchSettings()V
    .locals 2

    .prologue
    .line 2553
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleClose()V

    .line 2554
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 2555
    .local v0, intent:Landroid/content/Intent;
    const-class v1, Lcom/android/inputmethod/latin/iphone/LatinIMESettings;

    invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 2556
    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 2557
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->startActivity(Landroid/content/Intent;)V

    .line 2558
    return-void
.end method

.method private listToString(Ljava/util/List;)Ljava/lang/String;
    .locals 5
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/CharSequence;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .local p1, theList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    const-string v4, ""

    .line 2316
    if-eqz p1, :cond_0

    const-string v3, ""

    invoke-virtual {p1, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 2317
    :cond_0
    const-string v3, ""

    move-object v3, v4

    .line 2328
    :goto_0
    return-object v3

    .line 2320
    :cond_1
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    .line 2322
    .local v1, len:I
    new-instance v2, Ljava/lang/String;

    const-string v3, ""

    invoke-direct {v2, v4}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

    .line 2324
    .local v2, result:Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_1
    if-ge v0, v1, :cond_2

    .line 2325
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\n"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 2324
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_2
    move-object v3, v2

    .line 2328
    goto :goto_0
.end method

.method private loadSettings()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 2562
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v1

    .line 2563
    .local v1, sp:Landroid/content/SharedPreferences;
    const-string v2, "vibrate_on"

    invoke-interface {v1, v2, v6}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibrateOn:Z

    .line 2564
    const-string v2, "sound_on"

    invoke-interface {v1, v2, v6}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mSoundOn:Z

    .line 2568
    iput-boolean v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mQuickFixes:Z

    .line 2572
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-static {v2}, Landroid/text/AutoText;->getSize(Landroid/view/View;)I

    move-result v2

    if-ge v2, v5, :cond_0

    iput-boolean v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mQuickFixes:Z

    .line 2579
    :cond_0
    iput-boolean v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoPunctuate:Z

    .line 2580
    iput-boolean v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoReplace:Z

    .line 2582
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->isUsingHardKeyboard()Z

    move-result v2

    if-eqz v2, :cond_6

    .line 2585
    const-string v2, "show_completions"

    invoke-interface {v1, v2, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowSuggestions:Z

    .line 2587
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "auto_replace"

    invoke-static {v2, v3, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2

    if-lez v2, :cond_3

    move v2, v5

    :goto_0
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoReplace:Z

    .line 2589
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "auto_punctuate"

    invoke-static {v2, v3, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2

    if-lez v2, :cond_4

    move v2, v5

    :goto_1
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoPunctuate:Z

    .line 2591
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "auto_caps"

    invoke-static {v2, v3, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2

    if-lez v2, :cond_5

    move v2, v5

    :goto_2
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCap:Z

    .line 2597
    const/4 v0, 0x0

    .line 2609
    .local v0, autoComplete:Z
    :goto_3
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    if-eqz v2, :cond_7

    if-nez v0, :cond_1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mQuickFixes:Z

    if-eqz v2, :cond_7

    :cond_1
    move v2, v5

    :goto_4
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCorrectOn:Z

    .line 2610
    if-eqz v0, :cond_8

    const/4 v2, 0x2

    :goto_5
    iput v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    .line 2614
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-eqz v2, :cond_2

    iget v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceEngineId:I

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->getEngineId()I

    move-result v3

    if-eq v2, v3, :cond_2

    .line 2616
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->onFinish()V

    .line 2617
    const/4 v2, 0x0

    iput-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    .line 2619
    :cond_2
    return-void

    .end local v0           #autoComplete:Z
    :cond_3
    move v2, v6

    .line 2587
    goto :goto_0

    :cond_4
    move v2, v6

    .line 2589
    goto :goto_1

    :cond_5
    move v2, v6

    .line 2591
    goto :goto_2

    .line 2601
    :cond_6
    const-string v2, "show_suggestions"

    invoke-interface {v1, v2, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mQuickFixes:Z

    and-int/2addr v2, v3

    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowSuggestions:Z

    .line 2603
    const-string v2, "auto_cap"

    invoke-interface {v1, v2, v5}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v2

    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCap:Z

    .line 2604
    const-string v2, "auto_complete"

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const/high16 v4, 0x7f07

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getBoolean(I)Z

    move-result v3

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .restart local v0       #autoComplete:Z
    goto :goto_3

    :cond_7
    move v2, v6

    .line 2609
    goto :goto_4

    .line 2610
    :cond_8
    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mQuickFixes:Z

    if-eqz v2, :cond_9

    move v2, v5

    goto :goto_5

    :cond_9
    move v2, v6

    goto :goto_5
.end method

.method private loadVoiceEngineId()I
    .locals 4

    .prologue
    .line 426
    const/4 v1, 0x1

    .line 428
    .local v1, voiceEngineId:I
    :try_start_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "voice_to_text"

    invoke-static {v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v1

    .line 430
    if-eqz v1, :cond_0

    const/4 v2, 0x1

    if-eq v1, v2, :cond_0

    .line 431
    const/4 v1, 0x1

    .line 436
    :cond_0
    :goto_0
    return v1

    .line 433
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 434
    .local v0, e:Ljava/lang/Exception;
    const-string v2, "LatinIME"

    const-string v3, "Error when reading voice to text engine choice from settings!"

    invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method private measureCps()V
    .locals 0

    .prologue
    .line 2693
    return-void
.end method

.method private needHandleHardKeyEvent(ILandroid/view/KeyEvent;)Z
    .locals 5
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v4, 0x0

    .line 1164
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v1

    .line 1165
    .local v1, ei:Landroid/view/inputmethod/EditorInfo;
    if-nez v1, :cond_0

    move v3, v4

    .line 1191
    :goto_0
    return v3

    .line 1169
    :cond_0
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getUnicodeChar()I

    move-result v0

    .line 1171
    .local v0, charCode:I
    iget v3, v1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    and-int/lit8 v3, v3, 0xf

    packed-switch v3, :pswitch_data_0

    .line 1180
    :cond_1
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v3

    if-lez v3, :cond_3

    .line 1181
    sget-object v3, Lcom/android/inputmethod/latin/LatinIME;->PICKER_SETS:Landroid/util/SparseArray;

    invoke-virtual {v3, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 1183
    .local v2, set:Ljava/lang/String;
    if-eqz v2, :cond_3

    .line 1184
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v3, :cond_2

    .line 1185
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v3

    invoke-direct {p0, v3}, Lcom/android/inputmethod/latin/LatinIME;->commitTyped(Landroid/view/inputmethod/InputConnection;)V

    :cond_2
    move v3, v4

    .line 1187
    goto :goto_0

    .line 1175
    .end local v2           #set:Ljava/lang/String;
    :pswitch_0
    const/16 v3, 0xa

    if-eq v0, v3, :cond_1

    move v3, v4

    .line 1176
    goto :goto_0

    .line 1191
    :cond_3
    const/4 v3, 0x1

    goto :goto_0

    .line 1171
    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method private noEnterAction()Z
    .locals 4

    .prologue
    .line 1802
    const/4 v1, 0x0

    .line 1803
    .local v1, noAction:Z
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v0

    .line 1806
    .local v0, ei:Landroid/view/inputmethod/EditorInfo;
    if-eqz v0, :cond_1

    iget v2, v0, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    const/high16 v3, 0x4000

    and-int/2addr v2, v3

    if-nez v2, :cond_0

    iget v2, v0, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    and-int/lit16 v2, v2, 0xff

    const/4 v3, 0x1

    if-ne v2, v3, :cond_1

    .line 1809
    :cond_0
    const/4 v1, 0x1

    .line 1812
    :cond_1
    return v1
.end method

.method private pickDefaultSuggestion()V
    .locals 3

    .prologue
    const/4 v1, 0x0

    .line 2063
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->hasMessages(I)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2064
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 2065
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestions()V

    .line 2067
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    if-eqz v0, :cond_1

    .line 2068
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/WordComposer;->getTypedWord()Ljava/lang/CharSequence;

    move-result-object v0

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    invoke-static {v0, v1}, Lcom/android/inputmethod/latin/TextEntryState;->acceptedDefault(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)V

    .line 2069
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustAccepted:Z

    .line 2070
    const-string v0, "LatinIME"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "pick Default Suggestion with:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 2071
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    invoke-direct {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->pickSuggestion(Ljava/lang/CharSequence;)V

    .line 2073
    :cond_1
    return-void
.end method

.method private pickSuggestion(Ljava/lang/CharSequence;)V
    .locals 7
    .parameter "suggestion"

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 2273
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->isUsingHardKeyboard()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x2

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->getHKBShiftState()I

    move-result v1

    if-ne v0, v1, :cond_0

    .line 2275
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object p1

    .line 2282
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v6

    .line 2283
    .local v6, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v6, :cond_1

    .line 2284
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->doPostHoc()Z

    move-result v0

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/CandidateView;->getSuggestions()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_5

    .line 2287
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/CandidateView;->getSuggestions()Ljava/util/List;

    move-result-object v0

    invoke-direct {p0, p1, v0}, Lcom/android/inputmethod/latin/LatinIME;->attachAlternatesToText(Ljava/lang/CharSequence;Ljava/util/List;)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v6, v0, v3}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 2299
    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoDictionary:Lcom/android/inputmethod/latin/ExpandableDictionary;

    invoke-virtual {v0, p1}, Lcom/android/inputmethod/latin/ExpandableDictionary;->isValidWord(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    invoke-virtual {v0, p1}, Lcom/android/inputmethod/latin/Suggest;->isValidWord(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_3

    .line 2300
    :cond_2
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoDictionary:Lcom/android/inputmethod/latin/ExpandableDictionary;

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    const/4 v3, 0x3

    invoke-virtual {v0, v1, v3}, Lcom/android/inputmethod/latin/ExpandableDictionary;->addWord(Ljava/lang/String;I)V

    .line 2302
    :cond_3
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 2303
    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v0

    iput v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommittedLength:I

    .line 2304
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    if-eqz v0, :cond_4

    .line 2305
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    const/4 v1, 0x0

    move v3, v2

    move v4, v2

    move v5, v2

    invoke-virtual/range {v0 .. v5}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 2307
    :cond_4
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 2308
    return-void

    .line 2289
    :cond_5
    invoke-interface {v6, p1, v3}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    goto :goto_0
.end method

.method private playKeyClick(I)V
    .locals 3
    .parameter "primaryCode"

    .prologue
    .line 2492
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mAudioManager:Landroid/media/AudioManager;

    if-nez v1, :cond_0

    .line 2493
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    if-eqz v1, :cond_0

    .line 2494
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateRingerMode()V

    .line 2497
    :cond_0
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mSoundOn:Z

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mSilentMode:Z

    if-nez v1, :cond_1

    .line 2500
    const/4 v0, 0x5

    .line 2501
    .local v0, sound:I
    sparse-switch p1, :sswitch_data_0

    .line 2512
    :goto_0
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mAudioManager:Landroid/media/AudioManager;

    const/high16 v2, -0x4080

    invoke-virtual {v1, v0, v2}, Landroid/media/AudioManager;->playSoundEffect(IF)V

    .line 2514
    .end local v0           #sound:I
    :cond_1
    return-void

    .line 2503
    .restart local v0       #sound:I
    :sswitch_0
    const/4 v0, 0x7

    .line 2504
    goto :goto_0

    .line 2506
    :sswitch_1
    const/16 v0, 0x8

    .line 2507
    goto :goto_0

    .line 2509
    :sswitch_2
    const/4 v0, 0x6

    goto :goto_0

    .line 2501
    :sswitch_data_0
    .sparse-switch
        -0x5 -> :sswitch_0
        0xa -> :sswitch_1
        0x20 -> :sswitch_2
    .end sparse-switch
.end method

.method private postUpdateShiftKeyState()V
    .locals 4

    .prologue
    const/4 v2, 0x2

    .line 1349
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V

    .line 1350
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v1, v2}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v1

    const-wide/16 v2, 0x12c

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1351
    return-void
.end method

.method private postUpdateSuggestions()V
    .locals 4

    .prologue
    const/4 v2, 0x0

    .line 1915
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V

    .line 1916
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    invoke-virtual {v1, v2}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v1

    const-wide/16 v2, 0x64

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1917
    return-void
.end method

.method private replaceCurrentWord(Ljava/lang/CharSequence;)V
    .locals 11
    .parameter "newWord"

    .prologue
    const/4 v10, 0x1

    const/4 v9, 0x0

    .line 2099
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v3

    .line 2100
    .local v3, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v3, :cond_0

    .line 2168
    :goto_0
    return-void

    .line 2102
    :cond_0
    const/16 v1, 0xa

    .line 2104
    .local v1, STEP_SIZE:I
    invoke-interface {v3, v1, v9}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2105
    .local v2, cs:Ljava/lang/CharSequence;
    const/4 v0, 0x1

    .line 2107
    .local v0, STEP_INDEX:I
    const/4 v4, 0x0

    .line 2108
    .local v4, leftDelete:I
    sget-object v7, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v8, "About to check the left of the cursor."

    invoke-virtual {v7, v8}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 2109
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-nez v7, :cond_4

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    if-lez v7, :cond_4

    .line 2110
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getLastSpacePos(Ljava/lang/CharSequence;)I

    move-result v6

    .line 2111
    .local v6, space_pos:I
    if-ltz v6, :cond_2

    .line 2112
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    sub-int/2addr v7, v6

    sub-int v4, v7, v10

    .line 2117
    :cond_1
    :goto_1
    if-gez v6, :cond_4

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    mul-int v8, v0, v1

    if-ne v7, v8, :cond_4

    .line 2118
    add-int/lit8 v0, v0, 0x1

    .line 2120
    mul-int v7, v0, v1

    invoke-interface {v3, v7, v9}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2122
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getLastSpacePos(Ljava/lang/CharSequence;)I

    move-result v6

    .line 2123
    if-ltz v6, :cond_3

    .line 2124
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    sub-int/2addr v7, v6

    sub-int v4, v7, v10

    goto :goto_1

    .line 2113
    :cond_2
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    if-ge v7, v1, :cond_1

    .line 2114
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v4

    goto :goto_1

    .line 2125
    :cond_3
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    mul-int v8, v0, v1

    if-ge v7, v8, :cond_1

    .line 2126
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v4

    goto :goto_1

    .line 2131
    .end local v6           #space_pos:I
    :cond_4
    invoke-interface {v3, v1, v9}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2132
    const/4 v0, 0x1

    .line 2134
    const/4 v5, 0x0

    .line 2136
    .local v5, rightDelete:I
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v7

    if-nez v7, :cond_8

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    if-lez v7, :cond_8

    .line 2137
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getFirstSpacePos(Ljava/lang/CharSequence;)I

    move-result v6

    .line 2138
    .restart local v6       #space_pos:I
    if-ltz v6, :cond_6

    .line 2139
    move v5, v6

    .line 2144
    :cond_5
    :goto_2
    if-gez v6, :cond_8

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    mul-int v8, v0, v1

    if-ne v7, v8, :cond_8

    .line 2145
    add-int/lit8 v0, v0, 0x1

    .line 2147
    mul-int v7, v0, v1

    invoke-interface {v3, v7, v9}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2149
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getFirstSpacePos(Ljava/lang/CharSequence;)I

    move-result v6

    .line 2150
    if-ltz v6, :cond_7

    .line 2151
    move v5, v6

    goto :goto_2

    .line 2140
    :cond_6
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    if-ge v7, v1, :cond_5

    .line 2141
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v5

    goto :goto_2

    .line 2152
    :cond_7
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v7

    mul-int v8, v0, v1

    if-ge v7, v8, :cond_5

    .line 2153
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v5

    goto :goto_2

    .line 2158
    .end local v6           #space_pos:I
    :cond_8
    invoke-interface {v3}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 2161
    invoke-interface {v3, v9, v5}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 2162
    invoke-interface {v3, v4, v9}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 2163
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    invoke-virtual {v7}, Lcom/android/inputmethod/latin/CandidateView;->getSuggestions()Ljava/util/List;

    move-result-object v7

    invoke-direct {p0, p1, v7}, Lcom/android/inputmethod/latin/LatinIME;->attachAlternatesToText(Ljava/lang/CharSequence;Ljava/util/List;)Ljava/lang/CharSequence;

    move-result-object v7

    invoke-interface {v3, v7, v10}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 2164
    invoke-interface {v3}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    goto/16 :goto_0
.end method

.method private sendSpace()V
    .locals 1

    .prologue
    .line 2425
    const/16 v0, 0x20

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->sendKeyChar(C)V

    .line 2426
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 2428
    return-void
.end method

.method private showOptionsMenu()V
    .locals 8

    .prologue
    const/4 v7, 0x1

    .line 2622
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 2623
    .local v0, builder:Landroid/app/AlertDialog$Builder;
    invoke-virtual {v0, v7}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    .line 2624
    const v5, 0x7f020019

    invoke-virtual {v0, v5}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    .line 2625
    const/high16 v5, 0x104

    const/4 v6, 0x0

    invoke-virtual {v0, v5, v6}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 2626
    const v5, 0x7f0a000a

    invoke-virtual {p0, v5}, Lcom/android/inputmethod/latin/LatinIME;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 2627
    .local v2, itemSettings:Ljava/lang/CharSequence;
    const v5, 0x10402bc

    invoke-virtual {p0, v5}, Lcom/android/inputmethod/latin/LatinIME;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 2628
    .local v1, itemInputMethod:Ljava/lang/CharSequence;
    const/4 v5, 0x2

    new-array v5, v5, [Ljava/lang/CharSequence;

    const/4 v6, 0x0

    aput-object v2, v5, v6

    aput-object v1, v5, v7

    new-instance v6, Lcom/android/inputmethod/latin/LatinIME$3;

    invoke-direct {v6, p0}, Lcom/android/inputmethod/latin/LatinIME$3;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    invoke-virtual {v0, v5, v6}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 2645
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f0a0009

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v5}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 2646
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v5

    iput-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    .line 2647
    iget-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    invoke-virtual {v5}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;

    move-result-object v4

    .line 2648
    .local v4, window:Landroid/view/Window;
    invoke-virtual {v4}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v3

    .line 2649
    .local v3, lp:Landroid/view/WindowManager$LayoutParams;
    iget-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v5}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getWindowToken()Landroid/os/IBinder;

    move-result-object v5

    iput-object v5, v3, Landroid/view/WindowManager$LayoutParams;->token:Landroid/os/IBinder;

    .line 2650
    const/16 v5, 0x3eb

    iput v5, v3, Landroid/view/WindowManager$LayoutParams;->type:I

    .line 2651
    invoke-virtual {v4, v3}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V

    .line 2652
    const/high16 v5, 0x2

    invoke-virtual {v4, v5}, Landroid/view/Window;->addFlags(I)V

    .line 2653
    iget-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    invoke-virtual {v5}, Landroid/app/AlertDialog;->show()V

    .line 2654
    return-void
.end method

.method private startTutorial()V
    .locals 4

    .prologue
    .line 2540
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mHandler:Landroid/os/Handler;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v1

    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 2541
    return-void
.end method

.method private stringToStringList(Ljava/lang/String;)Ljava/util/List;
    .locals 5
    .parameter "in"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List",
            "<",
            "Ljava/lang/CharSequence;",
            ">;"
        }
    .end annotation

    .prologue
    .line 773
    if-eqz p1, :cond_0

    const-string v4, ""

    invoke-virtual {p1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 774
    :cond_0
    const/4 v4, 0x0

    .line 783
    :goto_0
    return-object v4

    .line 777
    :cond_1
    const-string v4, "\\n"

    invoke-virtual {p1, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    .line 778
    .local v3, tmp:[Ljava/lang/String;
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 779
    .local v2, suggestions:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    array-length v1, v3

    .line 780
    .local v1, len:I
    const/4 v0, 0x0

    .local v0, i:I
    :goto_1
    if-ge v0, v1, :cond_2

    .line 781
    aget-object v4, v3, v0

    invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 780
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_2
    move-object v4, v2

    .line 783
    goto :goto_0
.end method

.method private swapPunctuationAndSpace()V
    .locals 7

    .prologue
    const/4 v6, 0x2

    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 1367
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 1368
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v0, :cond_1

    .line 1382
    :cond_0
    :goto_0
    return-void

    .line 1370
    :cond_1
    invoke-interface {v0, v6, v4}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v1

    .line 1371
    .local v1, lastTwo:Ljava/lang/CharSequence;
    if-eqz v1, :cond_0

    invoke-interface {v1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    if-ne v2, v6, :cond_0

    invoke-interface {v1, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    const/16 v3, 0x20

    if-ne v2, v3, :cond_0

    invoke-interface {v1, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->isRemoveSpacePunctuation(I)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 1375
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 1376
    invoke-interface {v0, v6, v4}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1377
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-interface {v1, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v2, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1378
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 1379
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    goto :goto_0
.end method

.method private swapPunctuationAndSpace2()Z
    .locals 7

    .prologue
    const/4 v6, 0x2

    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 1386
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 1387
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v0, :cond_0

    move v2, v4

    .line 1401
    :goto_0
    return v2

    .line 1388
    :cond_0
    invoke-interface {v0, v6, v4}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v1

    .line 1389
    .local v1, lastThree:Ljava/lang/CharSequence;
    if-eqz v1, :cond_1

    invoke-interface {v1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    if-ne v2, v6, :cond_1

    invoke-interface {v1, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->isSentenceSeparator(I)Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v1, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v2

    const/16 v3, 0x20

    if-ne v2, v3, :cond_1

    .line 1393
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 1394
    invoke-interface {v0, v6, v4}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 1395
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-interface {v1, v4}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v2, v5}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1396
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 1397
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    move v2, v5

    .line 1398
    goto :goto_0

    :cond_1
    move v2, v4

    .line 1401
    goto :goto_0
.end method

.method private toggleCapsLock()V
    .locals 2

    .prologue
    .line 1839
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    if-nez v0, :cond_1

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 1840
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1841
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->getKeyboard()Landroid/inputmethodservice/Keyboard;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboard;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinKeyboard;->setShiftLocked(Z)V

    .line 1843
    :cond_0
    return-void

    .line 1839
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private updateCSShiftCase(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    .locals 8
    .parameter "cs"
    .parameter "composing"

    .prologue
    const/4 v7, 0x0

    .line 2029
    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v3

    .line 2030
    .local v3, len1:I
    invoke-interface {p2}, Ljava/lang/CharSequence;->length()I

    move-result v4

    .line 2031
    .local v4, len2:I
    const/4 v0, 0x0

    .line 2032
    .local v0, cs1:Ljava/lang/CharSequence;
    const/4 v1, 0x0

    .line 2033
    .local v1, cs2:Ljava/lang/String;
    new-instance v5, Ljava/lang/StringBuilder;

    const/16 v6, 0x30

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(I)V

    .line 2034
    .local v5, sb:Ljava/lang/StringBuilder;
    if-le v3, v4, :cond_1

    .line 2035
    invoke-interface {p1, v4, v3}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    .line 2036
    const/4 v6, 0x1

    sub-int v6, v4, v6

    invoke-interface {p2, v6}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v6

    invoke-static {v6}, Ljava/lang/Character;->isUpperCase(C)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 2037
    invoke-virtual {v1}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v1

    .line 2041
    :goto_0
    invoke-interface {p1, v7, v4}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v0

    .line 2046
    :goto_1
    const/4 v2, 0x0

    .local v2, i:I
    :goto_2
    if-ge v2, v4, :cond_3

    .line 2047
    invoke-interface {p2, v2}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v6

    invoke-static {v6}, Ljava/lang/Character;->isUpperCase(C)Z

    move-result v6

    if-eqz v6, :cond_2

    .line 2048
    invoke-interface {v0, v2}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v6

    invoke-static {v6}, Ljava/lang/Character;->toUpperCase(C)C

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    .line 2046
    :goto_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_2

    .line 2039
    .end local v2           #i:I
    :cond_0
    invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 2043
    :cond_1
    move-object v0, p1

    goto :goto_1

    .line 2050
    .restart local v2       #i:I
    :cond_2
    invoke-interface {v0, v2}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v6

    invoke-static {v6}, Ljava/lang/Character;->toLowerCase(C)C

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    goto :goto_3

    .line 2052
    :cond_3
    if-eqz v1, :cond_4

    .line 2053
    invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 2055
    :cond_4
    if-eqz v5, :cond_5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->length()I

    move-result v6

    if-lez v6, :cond_5

    .line 2056
    invoke-virtual {v5}, Ljava/lang/StringBuilder;->length()I

    move-result v6

    invoke-virtual {v5, v7, v6}, Ljava/lang/StringBuilder;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object p1

    .line 2057
    :cond_5
    return-object p1
.end method

.method private updateRingerMode()V
    .locals 2

    .prologue
    .line 2481
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAudioManager:Landroid/media/AudioManager;

    if-nez v0, :cond_0

    .line 2482
    const-string v0, "audio"

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/media/AudioManager;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAudioManager:Landroid/media/AudioManager;

    .line 2484
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAudioManager:Landroid/media/AudioManager;

    if-eqz v0, :cond_1

    .line 2485
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mAudioManager:Landroid/media/AudioManager;

    invoke-virtual {v0}, Landroid/media/AudioManager;->getRingerMode()I

    move-result v0

    const/4 v1, 0x2

    if-eq v0, v1, :cond_2

    const/4 v0, 0x1

    :goto_0
    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSilentMode:Z

    .line 2487
    :cond_1
    return-void

    .line 2485
    :cond_2
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private updateSuggestionShiftCase(Ljava/util/List;Ljava/lang/StringBuilder;)V
    .locals 6
    .parameter
    .parameter "composing"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/CharSequence;",
            ">;",
            "Ljava/lang/StringBuilder;",
            ")V"
        }
    .end annotation

    .prologue
    .local p1, stringList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    const/4 v5, 0x0

    .line 2014
    if-eqz p2, :cond_0

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->length()I

    move-result v4

    if-nez v4, :cond_1

    .line 2027
    :cond_0
    return-void

    .line 2015
    :cond_1
    if-eqz p1, :cond_0

    .line 2016
    new-instance v2, Ljava/lang/StringBuilder;

    const/16 v4, 0x30

    invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(I)V

    .line 2017
    .local v2, sb:Ljava/lang/StringBuilder;
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v3

    .line 2018
    .local v3, size:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v3, :cond_0

    .line 2019
    invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 2020
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    .line 2021
    .local v0, cs:Ljava/lang/CharSequence;
    if-eqz v0, :cond_2

    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    if-nez v4, :cond_3

    .line 2018
    :cond_2
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 2022
    :cond_3
    invoke-virtual {p2}, Ljava/lang/StringBuilder;->length()I

    move-result v4

    invoke-virtual {p2, v5, v4}, Ljava/lang/StringBuilder;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v4

    invoke-direct {p0, v0, v4}, Lcom/android/inputmethod/latin/LatinIME;->updateCSShiftCase(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;

    .line 2023
    invoke-interface {p1, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 2024
    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    invoke-virtual {v2, v5, v4}, Ljava/lang/StringBuilder;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v4

    invoke-interface {p1, v1, v4}, Ljava/util/List;->add(ILjava/lang/Object;)V

    goto :goto_1
.end method

.method private updateSuggestionShiftCase(Ljava/util/List;Z)V
    .locals 7
    .parameter
    .parameter "shifted"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/CharSequence;",
            ">;Z)V"
        }
    .end annotation

    .prologue
    .local p1, stringList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    const/4 v6, 0x0

    .line 1996
    if-eqz p2, :cond_2

    if-eqz p1, :cond_2

    .line 1997
    new-instance v2, Ljava/lang/StringBuilder;

    const/16 v4, 0x30

    invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(I)V

    .line 1998
    .local v2, sb:Ljava/lang/StringBuilder;
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v3

    .line 1999
    .local v3, size:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v3, :cond_2

    .line 2000
    invoke-virtual {v2, v6}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 2001
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    .line 2002
    .local v0, cs:Ljava/lang/CharSequence;
    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    if-nez v4, :cond_1

    .line 1999
    :cond_0
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 2003
    :cond_1
    invoke-interface {v0, v6}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v4

    invoke-static {v4}, Ljava/lang/Character;->toUpperCase(C)C

    move-result v4

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    .line 2004
    const/4 v4, 0x1

    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v5

    invoke-interface {v0, v4, v5}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;

    .line 2005
    invoke-interface {p1, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 2006
    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    invoke-virtual {v2, v6, v4}, Ljava/lang/StringBuilder;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v4

    invoke-interface {p1, v1, v4}, Ljava/util/List;->add(ILjava/lang/Object;)V

    goto :goto_1

    .line 2009
    .end local v0           #cs:Ljava/lang/CharSequence;
    .end local v1           #i:I
    .end local v2           #sb:Ljava/lang/StringBuilder;
    .end local v3           #size:I
    :cond_2
    return-void
.end method

.method private updateSuggestions()V
    .locals 11

    .prologue
    const/4 v1, 0x0

    const/4 v10, 0x1

    const/4 v2, 0x0

    .line 1931
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    if-eqz v0, :cond_0

    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isPredictionOn()Z

    move-result v0

    if-nez v0, :cond_1

    .line 1992
    :cond_0
    :goto_0
    return-void

    .line 1935
    :cond_1
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-nez v0, :cond_2

    .line 1936
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move v3, v2

    move v4, v2

    move v5, v2

    invoke-virtual/range {v0 .. v5}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    goto :goto_0

    .line 1944
    :cond_2
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isCandidateStripVisible()Z

    move-result v0

    if-nez v0, :cond_3

    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    if-eqz v0, :cond_8

    :cond_3
    move v0, v10

    :goto_1
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->setCandidatesViewShown(Z)V

    .line 1947
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    iget-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v0, v3, v5, v2}, Lcom/android/inputmethod/latin/Suggest;->getSuggestions(Landroid/view/View;Lcom/android/inputmethod/latin/WordComposer;Z)Ljava/util/List;

    move-result-object v4

    .line 1948
    .local v4, stringList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/Suggest;->hasMinimalCorrection()Z

    move-result v7

    .line 1949
    .local v7, correctionAvailable:Z
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/Suggest;->hasAutoTextCorrection()Z

    move-result v8

    .line 1951
    .local v8, autoTextCorrection:Z
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/WordComposer;->getTypedWord()Ljava/lang/CharSequence;

    move-result-object v9

    .line 1953
    .local v9, typedWord:Ljava/lang/CharSequence;
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    invoke-virtual {v0, v9}, Lcom/android/inputmethod/latin/Suggest;->isValidWord(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_4

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->preferCapitalization()Z

    move-result v0

    if-eqz v0, :cond_9

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    invoke-virtual {v9}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Lcom/android/inputmethod/latin/Suggest;->isValidWord(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_9

    :cond_4
    move v6, v10

    .line 1955
    .local v6, typedWordValid:Z
    :goto_2
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    const/4 v3, 0x2

    if-ne v0, v3, :cond_a

    .line 1956
    or-int/2addr v7, v6

    .line 1961
    :goto_3
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/WordComposer;->isMostlyCaps()Z

    move-result v0

    if-nez v0, :cond_b

    move v0, v10

    :goto_4
    and-int/2addr v7, v0

    .line 1964
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    if-eqz v0, :cond_5

    .line 1965
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-direct {p0, v4, v0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestionShiftCase(Ljava/util/List;Ljava/lang/StringBuilder;)V

    .line 1969
    :cond_5
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    invoke-virtual {v0, v4}, Lcom/android/inputmethod/latin/Suggest;->removeDupes(Ljava/util/List;)V

    .line 1972
    if-eqz v7, :cond_6

    if-nez v6, :cond_6

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v0

    if-le v0, v10, :cond_6

    .line 1973
    invoke-interface {v4, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    invoke-interface {v0}, Ljava/lang/CharSequence;->length()I

    move-result v0

    invoke-interface {v9}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-ne v0, v3, :cond_c

    move v0, v10

    :goto_5
    and-int/2addr v7, v0

    .line 1975
    invoke-interface {v4, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    invoke-direct {p0, v0, v9}, Lcom/android/inputmethod/latin/LatinIME;->isContractWordOfTyped(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z

    move-result v0

    or-int/2addr v7, v0

    .line 1978
    :cond_6
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move v5, v2

    invoke-virtual/range {v3 .. v8}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 1980
    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_e

    .line 1981
    if-nez v8, :cond_7

    if-eqz v7, :cond_d

    :cond_7
    if-nez v6, :cond_d

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v0

    if-le v0, v10, :cond_d

    .line 1982
    invoke-interface {v4, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/CharSequence;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    goto/16 :goto_0

    .end local v4           #stringList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    .end local v6           #typedWordValid:Z
    .end local v7           #correctionAvailable:Z
    .end local v8           #autoTextCorrection:Z
    .end local v9           #typedWord:Ljava/lang/CharSequence;
    :cond_8
    move v0, v2

    .line 1944
    goto/16 :goto_1

    .restart local v4       #stringList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    .restart local v7       #correctionAvailable:Z
    .restart local v8       #autoTextCorrection:Z
    .restart local v9       #typedWord:Ljava/lang/CharSequence;
    :cond_9
    move v6, v2

    .line 1953
    goto :goto_2

    .line 1958
    .restart local v6       #typedWordValid:Z
    :cond_a
    const/4 v7, 0x0

    goto :goto_3

    :cond_b
    move v0, v2

    .line 1961
    goto :goto_4

    :cond_c
    move v0, v2

    .line 1973
    goto :goto_5

    .line 1984
    :cond_d
    iput-object v9, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    goto/16 :goto_0

    .line 1987
    :cond_e
    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    goto/16 :goto_0
.end method

.method private vibrate()V
    .locals 3

    .prologue
    .line 2517
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibrateOn:Z

    if-nez v0, :cond_0

    .line 2524
    :goto_0
    return-void

    .line 2520
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibrator:Landroid/os/Vibrator;

    if-nez v0, :cond_1

    .line 2521
    const-string v0, "vibrator"

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/Vibrator;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibrator:Landroid/os/Vibrator;

    .line 2523
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibrator:Landroid/os/Vibrator;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibratePattern:[J

    const/4 v2, -0x1

    invoke-virtual {v0, v1, v2}, Landroid/os/Vibrator;->vibrate([JI)V

    goto :goto_0
.end method


# virtual methods
.method public addWordToDictionary(Ljava/lang/String;)Z
    .locals 2
    .parameter "word"

    .prologue
    .line 1425
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

    const/16 v1, 0x80

    invoke-virtual {v0, p1, v1}, Lcom/android/inputmethod/latin/UserDictionary;->addWord(Ljava/lang/String;I)V

    .line 1426
    const/4 v0, 0x1

    return v0
.end method

.method commitVoiceInput()V
    .locals 2

    .prologue
    .line 309
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 310
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v0, :cond_0

    .line 317
    :goto_0
    return-void

    .line 313
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 314
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->finishComposingText()Z

    .line 315
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestions()V

    .line 316
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    goto :goto_0
.end method

.method protected dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
    .locals 3
    .parameter "fd"
    .parameter "fout"
    .parameter "args"

    .prologue
    .line 2666
    invoke-super {p0, p1, p2, p3}, Landroid/inputmethodservice/InputMethodService;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V

    .line 2668
    new-instance v0, Landroid/util/PrintWriterPrinter;

    invoke-direct {v0, p2}, Landroid/util/PrintWriterPrinter;-><init>(Ljava/io/PrintWriter;)V

    .line 2669
    .local v0, p:Landroid/util/Printer;
    const-string v1, "LatinIME state :"

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2670
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  Keyboard mode = "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->getKeyboardMode()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2671
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mCapsLock="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2672
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mComposing="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2673
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mPredictionOn="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2674
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mCorrectionMode="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2675
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mPredicting="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2676
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mAutoCorrectOn="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCorrectOn:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2677
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mAutoSpace="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoSpace:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2678
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mCompletionOn="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2679
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  TextEntryState.state="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->getState()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2680
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mSoundOn="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mSoundOn:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2681
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "  mVibrateOn="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibrateOn:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Landroid/util/Printer;->println(Ljava/lang/String;)V

    .line 2682
    return-void
.end method

.method public getCurrentWord()Ljava/lang/CharSequence;
    .locals 14

    .prologue
    const/4 v12, 0x1

    const/4 v11, 0x0

    const-string v13, ""

    .line 2172
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v3

    .line 2173
    .local v3, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v3, :cond_0

    const/4 v9, 0x0

    .line 2238
    :goto_0
    return-object v9

    .line 2175
    :cond_0
    const/16 v1, 0xa

    .line 2177
    .local v1, STEP_SIZE:I
    invoke-interface {v3, v1, v11}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2178
    .local v2, cs:Ljava/lang/CharSequence;
    const/4 v0, 0x1

    .line 2180
    .local v0, STEP_INDEX:I
    const/4 v4, 0x0

    .line 2181
    .local v4, left:I
    sget-object v9, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v10, "About to check the left of the cursor."

    invoke-virtual {v9, v10}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 2182
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_4

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    if-lez v9, :cond_4

    .line 2183
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getLastSpacePos(Ljava/lang/CharSequence;)I

    move-result v8

    .line 2184
    .local v8, space_pos:I
    if-ltz v8, :cond_2

    .line 2185
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    sub-int/2addr v9, v8

    sub-int v4, v9, v12

    .line 2190
    :cond_1
    :goto_1
    if-gez v8, :cond_4

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    mul-int v10, v0, v1

    if-ne v9, v10, :cond_4

    .line 2191
    add-int/lit8 v0, v0, 0x1

    .line 2193
    mul-int v9, v0, v1

    invoke-interface {v3, v9, v11}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2195
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getLastSpacePos(Ljava/lang/CharSequence;)I

    move-result v8

    .line 2196
    if-ltz v8, :cond_3

    .line 2197
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    sub-int/2addr v9, v8

    sub-int v4, v9, v12

    goto :goto_1

    .line 2186
    :cond_2
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    if-ge v9, v1, :cond_1

    .line 2187
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v4

    goto :goto_1

    .line 2198
    :cond_3
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    mul-int v10, v0, v1

    if-ge v9, v10, :cond_1

    .line 2199
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v4

    goto :goto_1

    .line 2204
    .end local v8           #space_pos:I
    :cond_4
    invoke-interface {v3, v1, v11}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2205
    const/4 v0, 0x1

    .line 2207
    const/4 v5, 0x0

    .line 2209
    .local v5, right:I
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_8

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    if-lez v9, :cond_8

    .line 2210
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getFirstSpacePos(Ljava/lang/CharSequence;)I

    move-result v8

    .line 2211
    .restart local v8       #space_pos:I
    if-ltz v8, :cond_6

    .line 2212
    move v5, v8

    .line 2217
    :cond_5
    :goto_2
    if-gez v8, :cond_8

    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    mul-int v10, v0, v1

    if-ne v9, v10, :cond_8

    .line 2218
    add-int/lit8 v0, v0, 0x1

    .line 2220
    mul-int v9, v0, v1

    invoke-interface {v3, v9, v11}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v2

    .line 2222
    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->getFirstSpacePos(Ljava/lang/CharSequence;)I

    move-result v8

    .line 2223
    if-ltz v8, :cond_7

    .line 2224
    move v5, v8

    goto :goto_2

    .line 2213
    :cond_6
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    if-ge v9, v1, :cond_5

    .line 2214
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v5

    goto :goto_2

    .line 2225
    :cond_7
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v9

    mul-int v10, v0, v1

    if-ge v9, v10, :cond_5

    .line 2226
    invoke-interface {v2}, Ljava/lang/CharSequence;->length()I

    move-result v5

    goto :goto_2

    .line 2230
    .end local v8           #space_pos:I
    :cond_8
    new-instance v6, Ljava/lang/String;

    const-string v9, ""

    invoke-direct {v6, v13}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

    .line 2231
    .local v6, s1:Ljava/lang/String;
    new-instance v7, Ljava/lang/String;

    const-string v9, ""

    invoke-direct {v7, v13}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

    .line 2232
    .local v7, s2:Ljava/lang/String;
    if-lez v4, :cond_9

    .line 2233
    invoke-interface {v3, v4, v11}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v6

    .line 2235
    :cond_9
    if-lez v5, :cond_a

    .line 2236
    invoke-interface {v3, v5, v11}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v7

    .line 2238
    :cond_a
    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v9, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    goto/16 :goto_0
.end method

.method protected getWordSeparators()Ljava/lang/String;
    .locals 1

    .prologue
    .line 2384
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWordSeparators:Ljava/lang/String;

    return-object v0
.end method

.method public hideWindow()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 874
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 875
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->dismiss()V

    .line 876
    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    .line 878
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    if-eqz v0, :cond_1

    .line 879
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/Tutorial;->close()Z

    .line 880
    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    .line 882
    :cond_1
    invoke-super {p0}, Landroid/inputmethodservice/InputMethodService;->hideWindow()V

    .line 883
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->endSession()V

    .line 884
    return-void
.end method

.method public isRemoveSpacePunctuation(I)Z
    .locals 2
    .parameter "code"

    .prologue
    .line 2420
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mRemoveSpacePunctuations:Ljava/lang/String;

    int-to-char v1, p1

    invoke-static {v1}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    return v0
.end method

.method public isSentenceSeparator(I)Z
    .locals 2
    .parameter "code"

    .prologue
    .line 2393
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSentenceSeparators:Ljava/lang/String;

    int-to-char v1, p1

    invoke-static {v1}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    return v0
.end method

.method public isUsingHardKeyboard()Z
    .locals 5

    .prologue
    const/4 v4, 0x1

    .line 463
    const/4 v1, 0x0

    .line 464
    .local v1, ret:Z
    const/4 v0, 0x0

    .line 466
    .local v0, config:Landroid/content/res/Configuration;
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    if-eqz v3, :cond_0

    .line 467
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 470
    :cond_0
    if-nez v0, :cond_1

    move v2, v1

    .line 480
    .end local v1           #ret:Z
    .local v2, ret:I
    :goto_0
    return v2

    .line 475
    .end local v2           #ret:I
    .restart local v1       #ret:Z
    :cond_1
    iget v3, v0, Landroid/content/res/Configuration;->keyboard:I

    if-eq v3, v4, :cond_2

    iget v3, v0, Landroid/content/res/Configuration;->hardKeyboardHidden:I

    if-ne v3, v4, :cond_2

    .line 477
    const/4 v1, 0x1

    :cond_2
    move v2, v1

    .line 480
    .restart local v2       #ret:I
    goto :goto_0
.end method

.method public isWordSeparator(I)Z
    .locals 2
    .parameter "code"

    .prologue
    .line 2388
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getWordSeparators()Ljava/lang/String;

    move-result-object v0

    .line 2389
    .local v0, separators:Ljava/lang/String;
    int-to-char v1, p1

    invoke-static {v1}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    return v1
.end method

.method public onAppPrivateCommand(Ljava/lang/String;Landroid/os/Bundle;)V
    .locals 1
    .parameter "action"
    .parameter "data"

    .prologue
    .line 1321
    const-string v0, "com.motorola.inputmethod.clearMetaState"

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1323
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v0, :cond_0

    .line 1325
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/MetaKeyHandler;->clearMetaState()V

    .line 1329
    :cond_0
    return-void
.end method

.method public onComputeInsets(Landroid/inputmethodservice/InputMethodService$Insets;)V
    .locals 1
    .parameter "outInsets"

    .prologue
    .line 925
    invoke-super {p0, p1}, Landroid/inputmethodservice/InputMethodService;->onComputeInsets(Landroid/inputmethodservice/InputMethodService$Insets;)V

    .line 926
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->isFullscreenMode()Z

    move-result v0

    if-nez v0, :cond_0

    .line 927
    iget v0, p1, Landroid/inputmethodservice/InputMethodService$Insets;->visibleTopInsets:I

    iput v0, p1, Landroid/inputmethodservice/InputMethodService$Insets;->contentTopInsets:I

    .line 929
    :cond_0
    return-void
.end method

.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
    .locals 3
    .parameter "conf"

    .prologue
    .line 508
    iget-object v1, p1, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    invoke-virtual {v1}, Ljava/util/Locale;->toString()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mLocale:Ljava/lang/String;

    invoke-static {v1, v2}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 509
    iget-object v1, p1, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    invoke-virtual {v1}, Ljava/util/Locale;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/android/inputmethod/latin/LatinIME;->initSuggest(Ljava/lang/String;)V

    .line 512
    :cond_0
    iget v1, p1, Landroid/content/res/Configuration;->orientation:I

    iget v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mOrientation:I

    if-eq v1, v2, :cond_1

    .line 513
    iget v1, p1, Landroid/content/res/Configuration;->orientation:I

    iput v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mOrientation:I

    .line 514
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-eqz v1, :cond_1

    .line 515
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->onConfigurationChanged()V

    .line 518
    :cond_1
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 519
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v0, :cond_2

    .line 520
    invoke-direct {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->commitTyped(Landroid/view/inputmethod/InputConnection;)V

    .line 522
    :cond_2
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    if-nez v1, :cond_3

    .line 523
    new-instance v1, Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-direct {v1, p0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    .line 525
    :cond_3
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->makeKeyboards(Z)V

    .line 527
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v1, :cond_4

    .line 528
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 531
    :cond_4
    invoke-super {p0, p1}, Landroid/inputmethodservice/InputMethodService;->onConfigurationChanged(Landroid/content/res/Configuration;)V

    .line 532
    return-void
.end method

.method public onCreate()V
    .locals 12

    .prologue
    const/4 v10, 0x0

    const-string v11, "LatinIME"

    .line 347
    invoke-super {p0}, Landroid/inputmethodservice/InputMethodService;->onCreate()V

    .line 349
    new-instance v6, Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-direct {v6, p0}, Lcom/android/inputmethod/latin/KeyboardSwitcher;-><init>(Lcom/android/inputmethod/latin/LatinIME;)V

    iput-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    .line 350
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    invoke-virtual {v6}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v1

    .line 351
    .local v1, conf:Landroid/content/res/Configuration;
    iget-object v6, v1, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    invoke-virtual {v6}, Ljava/util/Locale;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-direct {p0, v6}, Lcom/android/inputmethod/latin/LatinIME;->initSuggest(Ljava/lang/String;)V

    .line 352
    iget v6, v1, Landroid/content/res/Configuration;->orientation:I

    iput v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mOrientation:I

    .line 356
    :try_start_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    const/high16 v7, 0x7f06

    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->obtainTypedArray(I)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 357
    .local v0, ar:Landroid/content/res/TypedArray;
    invoke-virtual {v0}, Landroid/content/res/TypedArray;->length()I

    move-result v5

    .line 358
    .local v5, len:I
    if-lez v5, :cond_0

    .line 359
    new-array v6, v5, [J

    iput-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibratePattern:[J

    .line 360
    const/4 v4, 0x0

    .local v4, i:I
    :goto_0
    if-ge v4, v5, :cond_0

    .line 361
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibratePattern:[J

    const/4 v7, 0x0

    invoke-virtual {v0, v4, v7}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result v7

    int-to-long v7, v7

    aput-wide v7, v6, v4

    .line 362
    const-string v6, "LatinIME"

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "mVibratePattern["

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "] = "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    iget-object v8, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibratePattern:[J

    aget-wide v8, v8, v4

    invoke-virtual {v7, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 360
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 365
    .end local v4           #i:I
    :cond_0
    invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
    :try_end_0
    .catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 369
    .end local v0           #ar:Landroid/content/res/TypedArray;
    .end local v5           #len:I
    :goto_1
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibratePattern:[J

    if-nez v6, :cond_1

    .line 371
    const/4 v6, 0x2

    new-array v6, v6, [J

    fill-array-data v6, :array_0

    iput-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mVibratePattern:[J

    .line 376
    :cond_1
    new-instance v3, Landroid/content/IntentFilter;

    const-string v6, "android.media.RINGER_MODE_CHANGED"

    invoke-direct {v3, v6}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 377
    .local v3, filter:Landroid/content/IntentFilter;
    iget-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v6, v3}, Lcom/android/inputmethod/latin/LatinIME;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 380
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->initMetaKeyHandler()Lcom/android/inputmethod/latin/MetaKeyHandler;

    move-result-object v6

    iput-object v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    .line 381
    iput-boolean v10, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 385
    iput-boolean v10, p0, Lcom/android/inputmethod/latin/LatinIME;->mMenuKeyPressed:Z

    .line 387
    return-void

    .line 366
    .end local v3           #filter:Landroid/content/IntentFilter;
    :catch_0
    move-exception v6

    move-object v2, v6

    .line 367
    .local v2, ex:Landroid/content/res/Resources$NotFoundException;
    const-string v6, "LatinIME"

    const-string v6, "vibrate pattern is missing from resource"

    invoke-static {v11, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    .line 371
    :array_0
    .array-data 0x8
        0x0t 0x0t 0x0t 0x0t 0x0t 0x0t 0x0t 0x0t
        0x6t 0x0t 0x0t 0x0t 0x0t 0x0t 0x0t 0x0t
    .end array-data
.end method

.method public onCreateCandidatesView()Landroid/view/View;
    .locals 3

    .prologue
    .line 551
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f030002

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/CandidateViewContainer;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateViewContainer:Lcom/android/inputmethod/latin/CandidateViewContainer;

    .line 553
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateViewContainer:Lcom/android/inputmethod/latin/CandidateViewContainer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/CandidateViewContainer;->initViews()V

    .line 554
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateViewContainer:Lcom/android/inputmethod/latin/CandidateViewContainer;

    const v1, 0x7f0b0002

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/CandidateViewContainer;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/CandidateView;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    .line 555
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    invoke-virtual {v0, p0}, Lcom/android/inputmethod/latin/CandidateView;->setService(Lcom/android/inputmethod/latin/LatinIME;)V

    .line 556
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->setCandidatesViewShown(Z)V

    .line 557
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateViewContainer:Lcom/android/inputmethod/latin/CandidateViewContainer;

    return-object v0
.end method

.method public onCreateInputView()Landroid/view/View;
    .locals 4

    .prologue
    const/4 v3, 0x1

    .line 536
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f030004

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/android/inputmethod/latin/LatinKeyboardView;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    .line 538
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setInputView(Lcom/android/inputmethod/latin/LatinKeyboardView;)V

    .line 539
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0, v3}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->makeKeyboards(Z)V

    .line 540
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, p0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setOnKeyboardActionListener(Lcom/android/inputmethod/latin/KeyboardView$OnKeyboardActionListener;)V

    .line 541
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    const/4 v1, 0x0

    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v3, v1, v2}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    .line 542
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    return-object v0
.end method

.method public onDestroy()V
    .locals 1

    .prologue
    .line 495
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/UserDictionary;->close()V

    .line 496
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mContactsDictionary:Lcom/android/inputmethod/latin/ContactsDictionary;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/ContactsDictionary;->close()V

    .line 497
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 499
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-eqz v0, :cond_0

    .line 500
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->onFinish()V

    .line 503
    :cond_0
    invoke-super {p0}, Landroid/inputmethodservice/InputMethodService;->onDestroy()V

    .line 504
    return-void
.end method

.method public onDisplayCompletions([Landroid/view/inputmethod/CompletionInfo;)V
    .locals 11
    .parameter "completions"

    .prologue
    const/4 v1, 0x0

    const/4 v5, 0x1

    const/4 v2, 0x0

    .line 894
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    if-eqz v0, :cond_0

    .line 895
    iput-object p1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletions:[Landroid/view/inputmethod/CompletionInfo;

    .line 896
    if-nez p1, :cond_1

    .line 897
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move v3, v2

    move v4, v2

    move v5, v2

    invoke-virtual/range {v0 .. v5}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 911
    :cond_0
    :goto_0
    return-void

    .line 901
    :cond_1
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 902
    .local v4, stringList:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    const/4 v10, 0x0

    .local v10, i:I
    :goto_1
    if-eqz p1, :cond_3

    array-length v0, p1

    :goto_2
    if-ge v10, v0, :cond_4

    .line 903
    aget-object v9, p1, v10

    .line 904
    .local v9, ci:Landroid/view/inputmethod/CompletionInfo;
    if-eqz v9, :cond_2

    invoke-virtual {v9}, Landroid/view/inputmethod/CompletionInfo;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v4, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 902
    :cond_2
    add-int/lit8 v10, v10, 0x1

    goto :goto_1

    .end local v9           #ci:Landroid/view/inputmethod/CompletionInfo;
    :cond_3
    move v0, v2

    goto :goto_2

    .line 907
    :cond_4
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move v6, v5

    move v7, v5

    move v8, v2

    invoke-virtual/range {v3 .. v8}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 908
    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mBestWord:Ljava/lang/CharSequence;

    .line 909
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isCandidateStripVisible()Z

    move-result v0

    if-nez v0, :cond_5

    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    if-eqz v0, :cond_6

    :cond_5
    move v0, v5

    :goto_3
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->setCandidatesViewShown(Z)V

    goto :goto_0

    :cond_6
    move v0, v2

    goto :goto_3
.end method

.method public onFinishInput()V
    .locals 1

    .prologue
    .line 744
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v0, :cond_0

    .line 745
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 747
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->isVoiceKeyboardShown()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 749
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->onCancel()V

    .line 752
    :cond_1
    invoke-super {p0}, Landroid/inputmethodservice/InputMethodService;->onFinishInput()V

    .line 754
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    if-eqz v0, :cond_2

    .line 755
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->closing()V

    .line 757
    :cond_2
    return-void
.end method

.method public onKey(I[I)V
    .locals 10
    .parameter "primaryCode"
    .parameter "keyCodes"

    .prologue
    const/4 v1, 0x0

    const/4 v2, 0x0

    .line 1441
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    if-eqz v0, :cond_0

    .line 1443
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move v3, v2

    move v4, v2

    move v5, v2

    invoke-virtual/range {v0 .. v5}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 1444
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    .line 1447
    :cond_0
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v6

    .line 1448
    .local v6, when:J
    const/4 v0, -0x5

    if-ne p1, v0, :cond_1

    iget-wide v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mLastKeyTime:J

    const-wide/16 v8, 0xc8

    add-long/2addr v3, v8

    cmp-long v0, v6, v3

    if-lez v0, :cond_2

    .line 1450
    :cond_1
    iput v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mDeleteCount:I

    .line 1453
    :cond_2
    const/16 v0, 0x3e8

    if-eq p1, v0, :cond_3

    .line 1454
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    .line 1455
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    .line 1457
    :cond_3
    const/4 v0, -0x1

    if-eq p1, v0, :cond_4

    .line 1458
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    .line 1459
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    .line 1462
    :cond_4
    iput-wide v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mLastKeyTime:J

    .line 1463
    sparse-switch p1, :sswitch_data_0

    .line 1501
    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v0

    if-nez v0, :cond_5

    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->isRemoveSpacePunctuation(I)Z

    move-result v0

    if-eqz v0, :cond_a

    .line 1502
    :cond_5
    invoke-direct {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->handleSeparator(I)V

    .line 1507
    :goto_0
    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    .line 1509
    :cond_6
    :goto_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0, p1}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->onKey(I)Z

    move-result v0

    if-eqz v0, :cond_7

    .line 1510
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->changeKeyboardMode()V

    .line 1512
    :cond_7
    return-void

    .line 1465
    :sswitch_0
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleBackspace()V

    .line 1466
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mDeleteCount:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mDeleteCount:I

    goto :goto_1

    .line 1469
    :sswitch_1
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleShiftUp()V

    goto :goto_1

    .line 1472
    :sswitch_2
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    if-eqz v0, :cond_8

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mOptionsDialog:Landroid/app/AlertDialog;

    invoke-virtual {v0}, Landroid/app/AlertDialog;->isShowing()Z

    move-result v0

    if-nez v0, :cond_6

    .line 1473
    :cond_8
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleClose()V

    goto :goto_1

    .line 1478
    :sswitch_3
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift()Z

    move-result v0

    if-nez v0, :cond_6

    .line 1479
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->showOptionsMenu()V

    goto :goto_1

    .line 1482
    :sswitch_4
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isTempShift()Z

    move-result v0

    if-nez v0, :cond_6

    .line 1483
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->changeKeyboardMode()V

    goto :goto_1

    .line 1488
    :sswitch_5
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleCommaToggle()V

    goto :goto_1

    .line 1493
    :sswitch_6
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-nez v0, :cond_9

    .line 1494
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceEngineId:I

    invoke-static {p0, v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->getInstanceByEngineId(Lcom/android/inputmethod/latin/LatinIME;I)Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    move-result-object v0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    .line 1496
    :cond_9
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->startRecognition()V

    goto :goto_1

    .line 1504
    :cond_a
    invoke-direct {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->handleCharacter(I[I)V

    goto :goto_0

    .line 1463
    nop

    :sswitch_data_0
    .sparse-switch
        -0x7f -> :sswitch_6
        -0x64 -> :sswitch_3
        -0x5 -> :sswitch_0
        -0x3 -> :sswitch_2
        -0x2 -> :sswitch_4
        -0x1 -> :sswitch_1
        0x3e8 -> :sswitch_5
    .end sparse-switch
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 6
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 933
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mHasCommaPrevious:Z

    .line 934
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommaChangeTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    .line 935
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    .line 936
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    .line 938
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getFlags()I

    move-result v2

    and-int/lit8 v2, v2, 0x8

    if-eqz v2, :cond_4

    move v2, v4

    :goto_0
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 940
    sparse-switch p1, :sswitch_data_0

    .line 975
    :cond_0
    :goto_1
    move-object v0, p2

    .line 976
    .local v0, evt:Landroid/view/KeyEvent;
    const/4 v1, 0x0

    .line 978
    .local v1, ret:Z
    iput-object p2, p0, Lcom/android/inputmethod/latin/LatinIME;->mHardKeyEvent:Landroid/view/KeyEvent;

    .line 981
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v2, :cond_1

    .line 982
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    invoke-virtual {v2, p1, p2}, Lcom/android/inputmethod/latin/MetaKeyHandler;->handleKeyDown(ILandroid/view/KeyEvent;)Landroid/view/KeyEvent;

    move-result-object v0

    .line 986
    :cond_1
    if-eqz v0, :cond_2

    .line 987
    invoke-direct {p0, p1, v0}, Lcom/android/inputmethod/latin/LatinIME;->handleHardKeyEvent(ILandroid/view/KeyEvent;)Z

    move-result v1

    .line 990
    :cond_2
    if-eqz v0, :cond_3

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v2, :cond_3

    .line 991
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    invoke-virtual {v2, p1, p2, v1}, Lcom/android/inputmethod/latin/MetaKeyHandler;->adjustMetaStateAfterKeyPress(ILandroid/view/KeyEvent;Z)Z

    .line 994
    :cond_3
    iput-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mHardKeyEvent:Landroid/view/KeyEvent;

    .line 995
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 996
    if-eqz v1, :cond_8

    move v2, v4

    .line 1001
    .end local v0           #evt:Landroid/view/KeyEvent;
    .end local v1           #ret:Z
    :goto_2
    return v2

    :cond_4
    move v2, v3

    .line 938
    goto :goto_0

    .line 942
    :sswitch_0
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v2

    if-nez v2, :cond_0

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    if-eqz v2, :cond_0

    .line 943
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/LatinKeyboardView;->handleBack()Z

    move-result v2

    if-eqz v2, :cond_6

    .line 945
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v2, :cond_5

    .line 946
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    invoke-virtual {v2, p1, p2, v4}, Lcom/android/inputmethod/latin/MetaKeyHandler;->adjustMetaStateAfterKeyPress(ILandroid/view/KeyEvent;Z)Z

    .line 948
    :cond_5
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    move v2, v4

    .line 950
    goto :goto_2

    .line 951
    :cond_6
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    if-eqz v2, :cond_0

    .line 952
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/Tutorial;->close()Z

    .line 953
    iput-object v5, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    goto :goto_1

    .line 962
    :sswitch_1
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    if-eqz v2, :cond_0

    .line 964
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v2, :cond_7

    .line 965
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    invoke-virtual {v2, p1, p2, v4}, Lcom/android/inputmethod/latin/MetaKeyHandler;->adjustMetaStateAfterKeyPress(ILandroid/view/KeyEvent;Z)Z

    .line 967
    :cond_7
    iput-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    move v2, v4

    .line 969
    goto :goto_2

    .line 1001
    .restart local v0       #evt:Landroid/view/KeyEvent;
    .restart local v1       #ret:Z
    :cond_8
    invoke-super {p0, p1, p2}, Landroid/inputmethodservice/InputMethodService;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v2

    goto :goto_2

    .line 940
    nop

    :sswitch_data_0
    .sparse-switch
        0x4 -> :sswitch_0
        0x13 -> :sswitch_1
        0x14 -> :sswitch_1
        0x15 -> :sswitch_1
        0x16 -> :sswitch_1
    .end sparse-switch
.end method

.method public onKeyUp(ILandroid/view/KeyEvent;)Z
    .locals 17
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 1008
    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getFlags()I

    move-result v4

    and-int/lit8 v4, v4, 0x8

    if-eqz v4, :cond_1

    const/4 v4, 0x1

    :goto_0
    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1009
    move-object/from16 v15, p2

    .line 1011
    .local v15, evt:Landroid/view/KeyEvent;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    move-object v4, v0

    if-eqz v4, :cond_0

    .line 1012
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    move-object v4, v0

    move-object v0, v4

    move/from16 v1, p1

    move-object/from16 v2, p2

    invoke-virtual {v0, v1, v2}, Lcom/android/inputmethod/latin/MetaKeyHandler;->handleKeyUp(ILandroid/view/KeyEvent;)Landroid/view/KeyEvent;

    move-result-object v15

    .line 1017
    :cond_0
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    move v4, v0

    if-eqz v4, :cond_2

    .line 1018
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIgnoreHardKeyUp:Z

    .line 1020
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1022
    const/4 v4, 0x1

    .line 1078
    :goto_1
    return v4

    .line 1008
    .end local v15           #evt:Landroid/view/KeyEvent;
    :cond_1
    const/4 v4, 0x0

    goto :goto_0

    .line 1025
    .restart local v15       #evt:Landroid/view/KeyEvent;
    :cond_2
    invoke-virtual/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v14

    .line 1026
    .local v14, ei:Landroid/view/inputmethod/EditorInfo;
    if-eqz v14, :cond_3

    iget v4, v14, Landroid/view/inputmethod/EditorInfo;->inputType:I

    if-nez v4, :cond_4

    .line 1027
    :cond_3
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1028
    invoke-super/range {p0 .. p2}, Landroid/inputmethodservice/InputMethodService;->onKeyUp(ILandroid/view/KeyEvent;)Z

    move-result v4

    goto :goto_1

    .line 1035
    :cond_4
    invoke-direct/range {p0 .. p2}, Lcom/android/inputmethod/latin/LatinIME;->handleKeyShortcuts(ILandroid/view/KeyEvent;)Z

    move-result v4

    if-eqz v4, :cond_5

    .line 1040
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1042
    const/4 v4, 0x0

    goto :goto_1

    .line 1047
    :cond_5
    packed-switch p1, :pswitch_data_0

    .line 1076
    :cond_6
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1078
    invoke-super/range {p0 .. p2}, Landroid/inputmethodservice/InputMethodService;->onKeyUp(ILandroid/view/KeyEvent;)Z

    move-result v4

    goto :goto_1

    .line 1053
    :pswitch_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    move-object v4, v0

    if-eqz v4, :cond_7

    .line 1055
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1057
    const/4 v4, 0x1

    goto :goto_1

    .line 1060
    :cond_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    move-object v4, v0

    if-eqz v4, :cond_6

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    move-object v4, v0

    invoke-virtual {v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShown()Z

    move-result v4

    if-eqz v4, :cond_6

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    move-object v4, v0

    invoke-virtual {v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->isShifted()Z

    move-result v4

    if-eqz v4, :cond_6

    .line 1061
    new-instance v3, Landroid/view/KeyEvent;

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getDownTime()J

    move-result-wide v4

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getEventTime()J

    move-result-wide v6

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getAction()I

    move-result v8

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v9

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v10

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getDeviceId()I

    move-result v11

    invoke-virtual/range {p2 .. p2}, Landroid/view/KeyEvent;->getScanCode()I

    move-result v12

    const/16 v13, 0x41

    invoke-direct/range {v3 .. v13}, Landroid/view/KeyEvent;-><init>(JJIIIIII)V

    .line 1065
    .end local p2
    .local v3, event:Landroid/view/KeyEvent;
    invoke-virtual/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v16

    .line 1066
    .local v16, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v16, :cond_8

    move-object/from16 v0, v16

    move-object v1, v3

    invoke-interface {v0, v1}, Landroid/view/inputmethod/InputConnection;->sendKeyEvent(Landroid/view/KeyEvent;)Z

    .line 1068
    :cond_8
    const/4 v4, 0x0

    move v0, v4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mIsKeyFromSystem:Z

    .line 1070
    const/4 v4, 0x1

    move-object/from16 p2, v3

    .end local v3           #event:Landroid/view/KeyEvent;
    .restart local p2
    goto/16 :goto_1

    .line 1047
    nop

    :pswitch_data_0
    .packed-switch 0x13
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method public onPress(I)V
    .locals 1
    .parameter "primaryCode"

    .prologue
    .line 2457
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->vibrate()V

    .line 2458
    invoke-direct {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->playKeyClick(I)V

    .line 2459
    const/4 v0, -0x1

    if-ne v0, p1, :cond_0

    .line 2460
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleShiftPress()V

    .line 2465
    :goto_0
    return-void

    .line 2462
    :cond_0
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mHaseShiftPrevious:Z

    .line 2463
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mShiftTimer:Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinIME$commaChangeTimer;->removeTimer()V

    goto :goto_0
.end method

.method public onRelease(I)V
    .locals 0
    .parameter "primaryCode"

    .prologue
    .line 2469
    return-void
.end method

.method public onStartInput(Landroid/view/inputmethod/EditorInfo;Z)V
    .locals 1
    .parameter "attribute"
    .parameter "restarting"

    .prologue
    .line 701
    invoke-super {p0, p1, p2}, Landroid/inputmethodservice/InputMethodService;->onStartInput(Landroid/view/inputmethod/EditorInfo;Z)V

    .line 703
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->isUsingHardKeyboard()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 704
    invoke-virtual {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->onStartInputHKB(Landroid/view/inputmethod/EditorInfo;Z)V

    .line 706
    :cond_0
    return-void
.end method

.method public onStartInputHKB(Landroid/view/inputmethod/EditorInfo;Z)V
    .locals 2
    .parameter "attribute"
    .parameter "restarting"

    .prologue
    .line 716
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    if-nez v1, :cond_0

    .line 717
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->onCreateInputView()Landroid/view/View;

    move-result-object v0

    .line 718
    .local v0, v:Landroid/view/View;
    if-eqz v0, :cond_0

    .line 719
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->setInputView(Landroid/view/View;)V

    .line 725
    .end local v0           #v:Landroid/view/View;
    :cond_0
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateViewContainer:Lcom/android/inputmethod/latin/CandidateViewContainer;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    if-nez v1, :cond_2

    .line 726
    :cond_1
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->onCreateCandidatesView()Landroid/view/View;

    move-result-object v0

    .line 727
    .restart local v0       #v:Landroid/view/View;
    if-eqz v0, :cond_2

    .line 728
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->setCandidatesView(Landroid/view/View;)V

    .line 733
    .end local v0           #v:Landroid/view/View;
    :cond_2
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    if-eqz v1, :cond_3

    .line 734
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mMetaKeyHandler:Lcom/android/inputmethod/latin/MetaKeyHandler;

    invoke-virtual {v1, p0, p1, p2}, Lcom/android/inputmethod/latin/MetaKeyHandler;->startInput(Landroid/inputmethodservice/InputMethodService;Landroid/view/inputmethod/EditorInfo;Z)V

    .line 738
    :cond_3
    invoke-virtual {p0, p1, p2}, Lcom/android/inputmethod/latin/LatinIME;->onStartInputView(Landroid/view/inputmethod/EditorInfo;Z)V

    .line 739
    return-void
.end method

.method public onStartInputView(Landroid/view/inputmethod/EditorInfo;Z)V
    .locals 11
    .parameter "attribute"
    .parameter "restarting"

    .prologue
    const v5, 0x8000

    const/16 v4, 0x20

    const/4 v10, 0x2

    const/4 v9, 0x1

    const/4 v2, 0x0

    .line 563
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    .line 567
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    if-nez v0, :cond_0

    .line 690
    :goto_0
    return-void

    .line 571
    :cond_0
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->loadVoiceEngineId()I

    move-result v8

    .line 572
    .local v8, voiceEngineId:I
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceEngineId:I

    if-eq v8, v0, :cond_1

    .line 573
    iput v8, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceEngineId:I

    .line 574
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->isSupportedVILanguage()Z

    move-result v0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    .line 575
    const-string v0, "LatinIME"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Current language is supported by Voice Input? : "

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 578
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v0, v2}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->makeKeyboards(Z)V

    .line 580
    invoke-static {p0}, Lcom/android/inputmethod/latin/TextEntryState;->newSession(Landroid/content/Context;)V

    .line 582
    const/4 v6, 0x0

    .line 583
    .local v6, disableAutoCorrect:Z
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 584
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    .line 585
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletions:[Landroid/view/inputmethod/CompletionInfo;

    .line 586
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    .line 587
    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    and-int/lit8 v0, v0, 0xf

    packed-switch v0, :pswitch_data_0

    .line 658
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    iget v1, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v9, v1, v3}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    .line 660
    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 662
    :goto_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/LatinKeyboardView;->closing()V

    .line 663
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 664
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 665
    iput v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mDeleteCount:I

    .line 666
    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->setCandidatesViewShown(Z)V

    .line 667
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    const/4 v1, 0x0

    move v3, v2

    move v4, v2

    move v5, v2

    invoke-virtual/range {v0 .. v5}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 668
    :cond_2
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->loadSettings()V

    .line 669
    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 671
    if-eqz v6, :cond_4

    .line 672
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCorrectOn:Z

    .line 673
    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    if-ne v0, v10, :cond_3

    .line 674
    iput v9, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    .line 677
    :cond_3
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoReplace:Z

    .line 680
    :cond_4
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    invoke-virtual {v0, v9}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setProximityCorrectionEnabled(Z)V

    .line 681
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    if-eqz v0, :cond_5

    .line 682
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setCorrectionMode(I)V

    .line 684
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mSuggest:Lcom/android/inputmethod/latin/Suggest;

    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoReplace:Z

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/Suggest;->setAutoReplaceFlag(Z)V

    .line 687
    :cond_5
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    if-eqz v0, :cond_13

    iget v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCorrectionMode:I

    if-lez v0, :cond_13

    move v0, v9

    :goto_2
    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 688
    iget-object v0, p1, Landroid/view/inputmethod/EditorInfo;->privateImeOptions:Ljava/lang/String;

    invoke-direct {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->checkTutorial(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 590
    :pswitch_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    iget v1, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v10, v1, v3}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    goto :goto_1

    .line 594
    :pswitch_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    const/4 v1, 0x3

    iget v3, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v1, v3, v4}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    goto :goto_1

    .line 598
    :pswitch_2
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    iget v1, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v9, v1, v3}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    .line 601
    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 602
    iget-object v0, p1, Landroid/view/inputmethod/EditorInfo;->privateImeOptions:Ljava/lang/String;

    if-eqz v0, :cond_6

    iget-object v0, p1, Landroid/view/inputmethod/EditorInfo;->privateImeOptions:Ljava/lang/String;

    const-string v1, "nm"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_6

    .line 603
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    iget v1, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    invoke-virtual {v0, v9, v1, v2}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    .line 607
    :cond_6
    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    and-int/lit16 v7, v0, 0xff0

    .line 608
    .local v7, variation:I
    const/16 v0, 0x80

    if-eq v7, v0, :cond_7

    const/16 v0, 0x90

    if-ne v7, v0, :cond_8

    .line 610
    :cond_7
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 611
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    iget v1, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    invoke-virtual {v0, v9, v1, v2}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    .line 614
    :cond_8
    if-eq v7, v4, :cond_9

    const/16 v0, 0x60

    if-ne v7, v0, :cond_e

    .line 616
    :cond_9
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoSpace:Z

    .line 620
    :goto_3
    if-ne v7, v4, :cond_f

    .line 621
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 622
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    const/4 v1, 0x5

    iget v3, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v1, v3, v4}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    .line 642
    :cond_a
    :goto_4
    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    const/high16 v1, 0x8

    and-int/2addr v0, v1

    if-eqz v0, :cond_b

    .line 643
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 644
    const/4 v6, 0x1

    .line 647
    :cond_b
    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    and-int/2addr v0, v5

    if-nez v0, :cond_c

    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    const/high16 v1, 0x2

    and-int/2addr v0, v1

    if-nez v0, :cond_c

    .line 649
    const/4 v6, 0x1

    .line 651
    :cond_c
    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    const/high16 v1, 0x1

    and-int/2addr v0, v1

    if-eqz v0, :cond_d

    .line 652
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 653
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->isFullscreenMode()Z

    move-result v0

    iput-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    .line 655
    :cond_d
    invoke-virtual {p0, p1}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    goto/16 :goto_1

    .line 618
    :cond_e
    iput-boolean v9, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoSpace:Z

    goto :goto_3

    .line 624
    :cond_f
    const/16 v0, 0x10

    if-ne v7, v0, :cond_10

    .line 625
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    .line 626
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    const/4 v1, 0x4

    iget v3, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v1, v3, v4}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    goto :goto_4

    .line 628
    :cond_10
    const/16 v0, 0x40

    if-ne v7, v0, :cond_11

    .line 629
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    const/4 v1, 0x6

    iget v3, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I

    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mIsSupportVoiceInput:Z

    invoke-virtual {v0, v1, v3, v4}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->setKeyboardMode(IIZ)V

    goto :goto_4

    .line 631
    :cond_11
    const/16 v0, 0xb0

    if-ne v7, v0, :cond_12

    .line 632
    iput-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredictionOn:Z

    goto :goto_4

    .line 633
    :cond_12
    const/16 v0, 0xa0

    if-ne v7, v0, :cond_a

    .line 636
    iget v0, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    and-int/2addr v0, v5

    if-nez v0, :cond_a

    .line 637
    const/4 v6, 0x1

    goto :goto_4

    .end local v7           #variation:I
    :cond_13
    move v0, v2

    .line 687
    goto/16 :goto_2

    .line 587
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_2
        :pswitch_0
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public onText(Ljava/lang/CharSequence;)V
    .locals 2
    .parameter "text"

    .prologue
    .line 1595
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 1596
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v0, :cond_0

    .line 1605
    :goto_0
    return-void

    .line 1597
    :cond_0
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 1598
    iget-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-eqz v1, :cond_1

    .line 1599
    invoke-direct {p0, v0}, Lcom/android/inputmethod/latin/LatinIME;->commitTyped(Landroid/view/inputmethod/InputConnection;)V

    .line 1601
    :cond_1
    const/4 v1, 0x1

    invoke-interface {v0, p1, v1}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 1602
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 1603
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    .line 1604
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    goto :goto_0
.end method

.method public onUpdateSelection(IIIIII)V
    .locals 19
    .parameter "oldSelStart"
    .parameter "oldSelEnd"
    .parameter "newSelStart"
    .parameter "newSelEnd"
    .parameter "candidatesStart"
    .parameter "candidatesEnd"

    .prologue
    .line 790
    invoke-super/range {p0 .. p6}, Landroid/inputmethodservice/InputMethodService;->onUpdateSelection(IIIIII)V

    .line 795
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    move-object v2, v0

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->length()I

    move-result v2

    if-lez v2, :cond_0

    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    move v2, v0

    if-nez v2, :cond_1

    :cond_0
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    move v2, v0

    if-eqz v2, :cond_6

    :cond_1
    move/from16 v0, p3

    move/from16 v1, p6

    if-ne v0, v1, :cond_2

    move/from16 v0, p4

    move/from16 v1, p6

    if-eq v0, v1, :cond_6

    .line 798
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    move-object v2, v0

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 799
    const/4 v2, 0x0

    move v0, v2

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 801
    const/4 v2, 0x0

    move v0, v2

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    .line 803
    invoke-direct/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestions()V

    .line 804
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->reset()V

    .line 805
    invoke-virtual/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v11

    .line 806
    .local v11, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v11, :cond_3

    .line 807
    invoke-interface {v11}, Landroid/view/inputmethod/InputConnection;->finishComposingText()Z

    .line 813
    .end local v11           #ic:Landroid/view/inputmethod/InputConnection;
    :cond_3
    :goto_0
    const/4 v2, 0x0

    move v0, v2

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mJustAccepted:Z

    .line 814
    invoke-direct/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->postUpdateShiftKeyState()V

    .line 816
    invoke-direct/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->doPostHoc()Z

    move-result v2

    if-eqz v2, :cond_5

    .line 818
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    move v2, v0

    if-eqz v2, :cond_4

    .line 820
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move-object v2, v0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-virtual/range {v2 .. v7}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 821
    const/4 v2, 0x0

    move v0, v2

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    .line 824
    :cond_4
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v17

    .line 825
    .local v17, when:J
    const-wide/16 v8, 0xc8

    .line 826
    .local v8, THRESHOLD_POST_HOC_TIME:J
    move-object/from16 v0, p0

    iget-wide v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mLastKeyTime:J

    move-wide v4, v0

    sub-long v4, v17, v4

    cmp-long v2, v4, v8

    if-lez v2, :cond_5

    .line 827
    invoke-virtual/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v11

    .line 828
    .restart local v11       #ic:Landroid/view/inputmethod/InputConnection;
    if-nez v11, :cond_7

    .line 869
    .end local v8           #THRESHOLD_POST_HOC_TIME:J
    .end local v11           #ic:Landroid/view/inputmethod/InputConnection;
    .end local v17           #when:J
    :cond_5
    :goto_1
    return-void

    .line 809
    :cond_6
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    move v2, v0

    if-nez v2, :cond_3

    move-object/from16 v0, p0

    iget-boolean v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mJustAccepted:Z

    move v2, v0

    if-nez v2, :cond_3

    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->getState()I

    move-result v2

    const/4 v3, 0x3

    if-ne v2, v3, :cond_3

    .line 811
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->reset()V

    goto :goto_0

    .line 829
    .restart local v8       #THRESHOLD_POST_HOC_TIME:J
    .restart local v11       #ic:Landroid/view/inputmethod/InputConnection;
    .restart local v17       #when:J
    :cond_7
    const/4 v2, 0x1

    const/4 v3, 0x1

    invoke-interface {v11, v2, v3}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v15

    .line 830
    .local v15, toLeft:Ljava/lang/CharSequence;
    const/4 v2, 0x1

    const/4 v3, 0x1

    invoke-interface {v11, v2, v3}, Landroid/view/inputmethod/InputConnection;->getTextAfterCursor(II)Ljava/lang/CharSequence;

    move-result-object v16

    .line 832
    .local v16, toRight:Ljava/lang/CharSequence;
    const/4 v3, 0x0

    .line 833
    .local v3, suggestions:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    const/4 v12, 0x0

    .line 835
    .local v12, originalWord:Ljava/lang/CharSequence;
    invoke-static {v15}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_8

    instance-of v2, v15, Landroid/text/Spanned;

    if-eqz v2, :cond_8

    .line 836
    move-object v0, v15

    check-cast v0, Landroid/text/Spanned;

    move-object v14, v0

    .line 837
    .local v14, sp:Landroid/text/Spanned;
    const/4 v2, 0x0

    invoke-interface {v15}, Ljava/lang/CharSequence;->length()I

    move-result v4

    const-class v5, Landroid/text/Annotation;

    invoke-interface {v14, v2, v4, v5}, Landroid/text/Spanned;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;

    move-result-object v13

    check-cast v13, [Landroid/text/Annotation;

    .line 838
    .local v13, os:[Landroid/text/Annotation;
    if-eqz v13, :cond_8

    array-length v2, v13

    if-lez v2, :cond_8

    .line 839
    const/4 v2, 0x0

    aget-object v2, v13, v2

    invoke-virtual {v2}, Landroid/text/Annotation;->getValue()Ljava/lang/String;

    move-result-object v2

    move-object/from16 v0, p0

    move-object v1, v2

    invoke-direct {v0, v1}, Lcom/android/inputmethod/latin/LatinIME;->stringToStringList(Ljava/lang/String;)Ljava/util/List;

    move-result-object v3

    .line 840
    const/4 v2, 0x0

    aget-object v2, v13, v2

    invoke-virtual {v2}, Landroid/text/Annotation;->getKey()Ljava/lang/String;

    move-result-object v12

    .line 844
    .end local v13           #os:[Landroid/text/Annotation;
    .end local v14           #sp:Landroid/text/Spanned;
    :cond_8
    if-nez v3, :cond_9

    invoke-static/range {v16 .. v16}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_9

    move-object/from16 v0, v16

    instance-of v0, v0, Landroid/text/Spanned;

    move v2, v0

    if-eqz v2, :cond_9

    .line 846
    move-object/from16 v0, v16

    check-cast v0, Landroid/text/Spanned;

    move-object v14, v0

    .line 848
    .restart local v14       #sp:Landroid/text/Spanned;
    const/4 v2, 0x0

    invoke-interface/range {v16 .. v16}, Ljava/lang/CharSequence;->length()I

    move-result v4

    const-class v5, Landroid/text/Annotation;

    invoke-interface {v14, v2, v4, v5}, Landroid/text/Spanned;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;

    move-result-object v13

    check-cast v13, [Landroid/text/Annotation;

    .line 849
    .restart local v13       #os:[Landroid/text/Annotation;
    if-eqz v13, :cond_9

    array-length v2, v13

    if-lez v2, :cond_9

    .line 850
    const/4 v2, 0x0

    aget-object v2, v13, v2

    invoke-virtual {v2}, Landroid/text/Annotation;->getValue()Ljava/lang/String;

    move-result-object v2

    move-object/from16 v0, p0

    move-object v1, v2

    invoke-direct {v0, v1}, Lcom/android/inputmethod/latin/LatinIME;->stringToStringList(Ljava/lang/String;)Ljava/util/List;

    move-result-object v3

    .line 851
    const/4 v2, 0x0

    aget-object v2, v13, v2

    invoke-virtual {v2}, Landroid/text/Annotation;->getKey()Ljava/lang/String;

    move-result-object v12

    .line 855
    .end local v13           #os:[Landroid/text/Annotation;
    .end local v14           #sp:Landroid/text/Spanned;
    :cond_9
    if-eqz v3, :cond_5

    .line 856
    invoke-virtual/range {p0 .. p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentWord()Ljava/lang/CharSequence;

    move-result-object v10

    .line 857
    .local v10, currWord:Ljava/lang/CharSequence;
    invoke-static {v10}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_a

    invoke-static {v12}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_a

    invoke-static {v10, v12}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_a

    .line 859
    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v3, "Word has been edited, don\'t show suggestions."

    .end local v3           #suggestions:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    goto/16 :goto_1

    .line 860
    .restart local v3       #suggestions:Ljava/util/List;,"Ljava/util/List<Ljava/lang/CharSequence;>;"
    :cond_a
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move-object v2, v0

    if-eqz v2, :cond_5

    .line 861
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    move-object v2, v0

    const/4 v4, 0x0

    const/4 v5, 0x1

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-virtual/range {v2 .. v7}, Lcom/android/inputmethod/latin/CandidateView;->setSuggestions(Ljava/util/List;ZZZZ)V

    .line 862
    const/4 v2, 0x1

    move-object/from16 v0, p0

    move v1, v2

    invoke-virtual {v0, v1}, Lcom/android/inputmethod/latin/LatinIME;->setCandidatesViewShown(Z)V

    .line 863
    const/4 v2, 0x1

    move v0, v2

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    goto/16 :goto_1
.end method

.method public onWindowHidden()V
    .locals 1

    .prologue
    .line 762
    iget-boolean v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    if-eqz v0, :cond_0

    .line 763
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->commitVoiceInput()V

    .line 765
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->isVoiceKeyboardShown()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 767
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceKeyboardManager:Lcom/android/inputmethod/latin/VoiceKeyboardManager;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/VoiceKeyboardManager;->onCancel()V

    .line 769
    :cond_1
    return-void
.end method

.method public pickSuggestionManually(ILjava/lang/CharSequence;)V
    .locals 4
    .parameter "index"
    .parameter "suggestion"

    .prologue
    .line 2243
    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mShowingPostHoc:Z

    if-eqz v2, :cond_0

    .line 2244
    invoke-direct {p0, p2}, Lcom/android/inputmethod/latin/LatinIME;->replaceCurrentWord(Ljava/lang/CharSequence;)V

    .line 2268
    :goto_0
    return-void

    .line 2246
    :cond_0
    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletionOn:Z

    if-eqz v2, :cond_3

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletions:[Landroid/view/inputmethod/CompletionInfo;

    if-eqz v2, :cond_3

    if-ltz p1, :cond_3

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletions:[Landroid/view/inputmethod/CompletionInfo;

    array-length v2, v2

    if-ge p1, v2, :cond_3

    .line 2248
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCompletions:[Landroid/view/inputmethod/CompletionInfo;

    aget-object v0, v2, p1

    .line 2249
    .local v0, ci:Landroid/view/inputmethod/CompletionInfo;
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v1

    .line 2250
    .local v1, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz v1, :cond_1

    .line 2251
    invoke-interface {v1, v0}, Landroid/view/inputmethod/InputConnection;->commitCompletion(Landroid/view/inputmethod/CompletionInfo;)Z

    .line 2253
    :cond_1
    invoke-interface {p2}, Ljava/lang/CharSequence;->length()I

    move-result v2

    iput v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommittedLength:I

    .line 2254
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    if-eqz v2, :cond_2

    .line 2255
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCandidateView:Lcom/android/inputmethod/latin/CandidateView;

    invoke-virtual {v2}, Lcom/android/inputmethod/latin/CandidateView;->clear()V

    .line 2257
    :cond_2
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/android/inputmethod/latin/LatinIME;->updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V

    goto :goto_0

    .line 2260
    .end local v0           #ci:Landroid/view/inputmethod/CompletionInfo;
    .end local v1           #ic:Landroid/view/inputmethod/InputConnection;
    :cond_3
    invoke-direct {p0, p2}, Lcom/android/inputmethod/latin/LatinIME;->pickSuggestion(Ljava/lang/CharSequence;)V

    .line 2261
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2, p2}, Lcom/android/inputmethod/latin/TextEntryState;->acceptedSuggestion(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)V

    .line 2263
    iget-boolean v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoSpace:Z

    if-eqz v2, :cond_4

    .line 2264
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->sendSpace()V

    .line 2267
    :cond_4
    const/16 v2, 0x20

    const/4 v3, 0x1

    invoke-static {v2, v3}, Lcom/android/inputmethod/latin/TextEntryState;->typedCharacter(CZ)V

    goto :goto_0
.end method

.method public preferCapitalization()Z
    .locals 1

    .prologue
    .line 2431
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mWord:Lcom/android/inputmethod/latin/WordComposer;

    invoke-virtual {v0}, Lcom/android/inputmethod/latin/WordComposer;->isCapitalized()Z

    move-result v0

    return v0
.end method

.method promoteToUserDictionary(Ljava/lang/String;I)V
    .locals 1
    .parameter "word"
    .parameter "frequency"

    .prologue
    .line 2548
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

    invoke-virtual {v0, p1}, Lcom/android/inputmethod/latin/UserDictionary;->isValidWord(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 2550
    :goto_0
    return-void

    .line 2549
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mUserDictionary:Lcom/android/inputmethod/latin/UserDictionary;

    invoke-virtual {v0, p1, p2}, Lcom/android/inputmethod/latin/UserDictionary;->addWord(Ljava/lang/String;I)V

    goto :goto_0
.end method

.method public revertLastWord(Z)V
    .locals 7
    .parameter "deleteChar"

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 2359
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->length()I

    move-result v1

    .line 2360
    .local v1, length:I
    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    if-nez v4, :cond_2

    if-lez v1, :cond_2

    .line 2361
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 2362
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    iput-boolean v6, p0, Lcom/android/inputmethod/latin/LatinIME;->mPredicting:Z

    .line 2363
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->beginBatchEdit()Z

    .line 2364
    invoke-interface {v0, v6, v5}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v4

    iput-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    .line 2365
    if-eqz p1, :cond_0

    invoke-interface {v0, v6, v5}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 2366
    :cond_0
    iget v2, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommittedLength:I

    .line 2367
    .local v2, toDelete:I
    iget v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mCommittedLength:I

    invoke-interface {v0, v4, v5}, Landroid/view/inputmethod/InputConnection;->getTextBeforeCursor(II)Ljava/lang/CharSequence;

    move-result-object v3

    .line 2368
    .local v3, toTheLeft:Ljava/lang/CharSequence;
    if-eqz v3, :cond_1

    invoke-interface {v3}, Ljava/lang/CharSequence;->length()I

    move-result v4

    if-lez v4, :cond_1

    invoke-interface {v3, v5}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v4

    invoke-virtual {p0, v4}, Lcom/android/inputmethod/latin/LatinIME;->isWordSeparator(I)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 2370
    add-int/lit8 v2, v2, -0x1

    .line 2372
    :cond_1
    invoke-interface {v0, v2, v5}, Landroid/view/inputmethod/InputConnection;->deleteSurroundingText(II)Z

    .line 2373
    iget-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mComposing:Ljava/lang/StringBuilder;

    invoke-interface {v0, v4, v6}, Landroid/view/inputmethod/InputConnection;->setComposingText(Ljava/lang/CharSequence;I)Z

    .line 2374
    invoke-static {}, Lcom/android/inputmethod/latin/TextEntryState;->backspace()V

    .line 2375
    invoke-interface {v0}, Landroid/view/inputmethod/InputConnection;->endBatchEdit()Z

    .line 2376
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->postUpdateSuggestions()V

    .line 2381
    .end local v0           #ic:Landroid/view/inputmethod/InputConnection;
    .end local v2           #toDelete:I
    .end local v3           #toTheLeft:Ljava/lang/CharSequence;
    :goto_0
    return-void

    .line 2378
    :cond_2
    const/16 v4, 0x43

    invoke-virtual {p0, v4}, Lcom/android/inputmethod/latin/LatinIME;->sendDownUpKeyEvents(I)V

    .line 2379
    const/4 v4, 0x0

    iput-object v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mJustRevertedSeparator:Ljava/lang/CharSequence;

    goto :goto_0
.end method

.method revertVoiceInput()V
    .locals 3

    .prologue
    .line 320
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 321
    .local v0, ic:Landroid/view/inputmethod/InputConnection;
    if-nez v0, :cond_0

    .line 328
    :goto_0
    return-void

    .line 324
    :cond_0
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v0

    .line 325
    const-string v1, ""

    const/4 v2, 0x1

    invoke-interface {v0, v1, v2}, Landroid/view/inputmethod/InputConnection;->commitText(Ljava/lang/CharSequence;I)Z

    .line 326
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->updateSuggestions()V

    .line 327
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/android/inputmethod/latin/LatinIME;->mVoiceInputHighlighted:Z

    goto :goto_0
.end method

.method public setCandidatesViewShown(Z)V
    .locals 0
    .parameter "shown"

    .prologue
    .line 918
    invoke-super {p0, p1}, Landroid/inputmethodservice/InputMethodService;->setCandidatesViewShown(Z)V

    .line 921
    return-void
.end method

.method public swipeDown()V
    .locals 0

    .prologue
    .line 2449
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIME;->handleClose()V

    .line 2450
    return-void
.end method

.method public swipeLeft()V
    .locals 0

    .prologue
    .line 2446
    return-void
.end method

.method public swipeRight()V
    .locals 0

    .prologue
    .line 2442
    return-void
.end method

.method public swipeUp()V
    .locals 0

    .prologue
    .line 2454
    return-void
.end method

.method tutorialDone()V
    .locals 1

    .prologue
    .line 2544
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIME;->mTutorial:Lcom/android/inputmethod/latin/Tutorial;

    .line 2545
    return-void
.end method

.method public updateShiftKeyState(Landroid/view/inputmethod/EditorInfo;)V
    .locals 5
    .parameter "attr"

    .prologue
    .line 1354
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputConnection()Landroid/view/inputmethod/InputConnection;

    move-result-object v2

    .line 1355
    .local v2, ic:Landroid/view/inputmethod/InputConnection;
    if-eqz p1, :cond_2

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    if-eqz v3, :cond_2

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mKeyboardSwitcher:Lcom/android/inputmethod/latin/KeyboardSwitcher;

    invoke-virtual {v3}, Lcom/android/inputmethod/latin/KeyboardSwitcher;->isAlphabetMode()Z

    move-result v3

    if-eqz v3, :cond_2

    if-eqz v2, :cond_2

    .line 1357
    const/4 v0, 0x0

    .line 1358
    .local v0, caps:I
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIME;->getCurrentInputEditorInfo()Landroid/view/inputmethod/EditorInfo;

    move-result-object v1

    .line 1359
    .local v1, ei:Landroid/view/inputmethod/EditorInfo;
    iget-boolean v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mAutoCap:Z

    if-eqz v3, :cond_0

    if-eqz v1, :cond_0

    iget v3, v1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    if-eqz v3, :cond_0

    .line 1360
    iget v3, p1, Landroid/view/inputmethod/EditorInfo;->inputType:I

    invoke-interface {v2, v3}, Landroid/view/inputmethod/InputConnection;->getCursorCapsMode(I)I

    move-result v0

    .line 1362
    :cond_0
    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinIME;->mInputView:Lcom/android/inputmethod/latin/LatinKeyboardView;

    iget-boolean v4, p0, Lcom/android/inputmethod/latin/LatinIME;->mCapsLock:Z

    if-nez v4, :cond_1

    if-eqz v0, :cond_3

    :cond_1
    const/4 v4, 0x1

    :goto_0
    invoke-virtual {v3, v4}, Lcom/android/inputmethod/latin/LatinKeyboardView;->setShifted(Z)Z

    .line 1364
    .end local v0           #caps:I
    .end local v1           #ei:Landroid/view/inputmethod/EditorInfo;
    :cond_2
    return-void

    .line 1362
    .restart local v0       #caps:I
    .restart local v1       #ei:Landroid/view/inputmethod/EditorInfo;
    :cond_3
    const/4 v4, 0x0

    goto :goto_0
.end method
